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

[12.x]: Cache Tags in Database Driver #55193

Closed

Conversation

joaopalopes24
Copy link
Contributor

@joaopalopes24 joaopalopes24 commented Mar 27, 2025

By default, the forever time in the database driver is 315360000. Therefore, I created a getter and setter for an attribute ($foreverTime), which will define the time when the forever method is called. We use the default TaggableStore, but when passing the store to the TaggedCache and TagSet classes, we reduce the forever time to prevent the database from becoming too cluttered with tags.

An excellent solution for adding tags to the database driver.

When tags are used, the forever time will be set to one week.

@joaopalopes24 joaopalopes24 changed the title [Feature]: Cache Tags in Database Driver [12.x]: Cache Tags in Database Driver Mar 27, 2025
@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!

@joaopalopes24
Copy link
Contributor Author

@taylorotwell But this code is simple and very interesting.

@joaopalopes24
Copy link
Contributor Author

Or is there any possibility or idea of ​​implementing this feature?

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