mercredi 8 avril 2020

How to view all cache records in Laravel 5?

I have records in a tag cache, but I'm not sure what the cache keys for the various records are. If I do php artisan tinker to see the records in the cache I can see:

$ php artisan tinker
>>> \Cache::tags('my_tag_name');
=> Illuminate\Cache\RedisTaggedCache {#2355}

I would like to inspect some of these cached records, but I don't know the cache keys for the records. How can I see the records in the cache or list out the cache keys for the records?

Ultimately I'd like to view the records like

>>> \Cache::tags('my_tag_name')->get('someCacheKeyHere');

But not sure how to view the cache keys for the records with the tag "my_tag_name". How can I list out the records in the Laravel cache?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire