Modifying file cache key storage to include key #7
nmu-bouharri
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Hi, yes — that’s indeed the default behavior in Laravel. To achieve what you described, it would likely require implementing a custom cache driver where the logic for storing and retrieving items could be extended to also persist the original key, making it easier to inspect and manage. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As it stands, Laravel only retains a hash of the provided key when using the
filecache. Unfortunately, this guarantees that the cache keys shown in the UI are unrecognizable. I'm not sure if there is already a way in Laravel to keep the key with the cached value, but I could not find anything in a cursory source code search.I also noticed that Cache UI checks for a
keyin the serialized array value before defaulting to the filename, so I wonder if the package could include some code to enable key storage with each file in the cache. I'm not sure how it would work, but I imagine it's possible to extend and replace theFileStoreclass or something.Beta Was this translation helpful? Give feedback.
All reactions