-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
undocument cache tags due to complexity of implementation
- Loading branch information
1 parent
fca85ee
commit 63dde39
Showing
1 changed file
with
0 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that tags will be removed from Laravel 11+, or will they remain as an undocumented feature?
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, is there any background information on this change?
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite on odd change for such a good feature. Are there plans to phase it out? I hope not :o
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems really weird, aren't some packages using this heavily? It's also pretty useful for caching model instances.
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious as well on whether tags are being deprecated? Or just removed from documentation? My system relies on this heavily and need to know if I should build my own tags system if it is being removed.
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
livewire/livewire#7141
What's the recommended thing to do? Not use caching tags at all?
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any word on this?
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kohenkatz @timwassenburg @TheDeadCode @francoism90 @bmckay959 @francoism90 @EtraEllecon Taylor posted some explanation here: laravel/framework#48078 (comment)
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shaedrich Yeah, but the problem is that packages are using this for years now.
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, @zengbo's changes can be moved to a package … 🤔
63dde39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taylorotwell We have loads of apps that rely on cache tags.... It's a crucial feature for managing caching in any large scale app, or multi-tenant setups etc.
If you're open to breaking changes in v11, I think refactoring tags to work how they do in every other platform (i.e. much more simply) would be great. The complexity in Laravel comes from how multiple tags work. The readme of this package explains it well: https://github.com/swayok/alternative-laravel-cache.
I never understood the logic behind Laravel's implementation. Tags should be independent - i.e. you can tag a single cache object with multiple tags, then purge that object using any of those tags. So you could tag a post with
posts
andtenant_1
, and if you purged either theposts
ortenant_1
tag that object would be removed.