Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] pass value along to ttl callback #46006

Merged
merged 2 commits into from
Feb 7, 2023
Merged

[9.x] pass value along to ttl callback #46006

merged 2 commits into from
Feb 7, 2023

Conversation

dododedodonl
Copy link
Contributor

When using the Cache::remember() method I sometimes have a value that contains data which determines when the value should expire.

When it is relatively costly to determine the value, the functionality of Cache::remember() has to be duplicated elsewhere in order to not determine it twice. Providing the value to the ttl callback via the already used value() function would eliminate this duplication.

@taylorotwell taylorotwell merged commit 395f305 into laravel:9.x Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants