Thought we had sorted this out 2-3 weeks ago?
You can only retrieve from session if you know the key which is why it was suggested that you put all the users in a single array that you can load and access the correct value.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I am inserting the session id to the cache with the $user_id as the value for every user session:
Cache::put('session_test_' . $session_id ,$user_id, $seconds);
If a user logs from multiple browsers for example, he should have multiple cache items with his $user_id as the value.
How can I retrieve all the cache items that have the session_test_ prefix and the $user_id value?
Thanks
Thought we had sorted this out 2-3 weeks ago?
You can only retrieve from session if you know the key which is why it was suggested that you put all the users in a single array that you can load and access the correct value.
Please or to participate in this conversation.