File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -138,10 +138,12 @@ public function showTokens(RequestContextService $ctx): JsonResponse
138138 // Get current user to scope the cache key by roles
139139 $ user = $ ctx ->getCurrentUser ();
140140 $ rolesKey = md5 (serialize ($ user ? $ user ->getRoles () : []));
141+ print_r ($ rolesKey );
141142
142143 // FilesystemAdapter expects an integer TTL (in seconds). 7 days = 604800 seconds
143144 $ ttlSeconds = 7 * 24 * 3600 ;
144145 $ cache = new FilesystemAdapter ("tokens_ {$ rolesKey }" , $ ttlSeconds );
146+ print_r ($ cache );
145147
146148 // Use callback form as recommended by Symfony cache contracts.
147149 // The callback must return the data to cache (we store the decoded array, not a JsonResponse object).
@@ -150,6 +152,7 @@ public function showTokens(RequestContextService $ctx): JsonResponse
150152 $ response = $ this ->tokenService ->getTokens ($ userAuth );
151153 $ content = $ response ->getContent ();
152154 $ decoded = json_decode ($ content , true );
155+ print_r ($ decoded );
153156 return $ decoded ?: [];
154157
155158 // Fallback: if service returns array already
You can’t perform that action at this time.
0 commit comments