Ability to set default expiration time for all Cache keys #35374
Unanswered
foremtehan
asked this question in
Ideas
Replies: 3 comments 1 reply
-
@foremtehan The default is 'indefinitely' |
Beta Was this translation helpful? Give feedback.
0 replies
-
@joelbutcher Ok But I started this thread to gives a idea to manually set our default instead of "indefintely" Btw in new version i think this is 10 year not indefinitely |
Beta Was this translation helpful? Give feedback.
0 replies
-
Something like: public function boot()
{
Cache::setDefaultExpiration(now()->addHours(5));
} @paras-malhotra what do you think ? |
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.
-
I'm working on a project which i found my self doing this :
So it would be nice if we could set default expiration in
AppServiceProvider
for Cache facade, if the$ttl
didnt provided use the default value.Beta Was this translation helpful? Give feedback.
All reactions