Reputation: 4166
Is there a way to Store extra informations related to cached data?
Laravel 5 default:
Cache::add('key', 'value', $minutes);
I need to store user_id
too, to determine this cache related to which user,
and will add user_id
to cache
table design,
thx
Upvotes: 2
Views: 86
Reputation: 16324
You should make it with the key
attribute:
Cache::add('key_from_user_' . $user_id, 'value', $minutes);
Upvotes: 1