There might be a better way, but you could write it to the config:
config(['key' => $whatEverYouWantToCache]);
And when you need it you retrieve it from the config. On the next request it should be history ...
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I swear I read this in the docs once but I can no longer find it in the 5.5. documentation but I need to cache an item or a few items for the current request only but I cannot use Session. Is there a better way to do this I'm currently using Cache::remember with a 1 minute cache time... Thanks!
There might be a better way, but you could write it to the config:
config(['key' => $whatEverYouWantToCache]);
And when you need it you retrieve it from the config. On the next request it should be history ...
Please or to participate in this conversation.