-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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] Add CacheFlushed Event #55142
[12.x] Add CacheFlushed Event #55142
Conversation
Do these events even need to extend a class? Might be best to have everything contained in the final event classes, in my opinion. |
I also understand that it can be flushed using $cache->tags(['my_tag'])->flush();
framework/src/Illuminate/Cache/TaggedCache.php Lines 104 to 113 in dd16215
So , wouldn't |
I think it would be more consistent if it extended from |
@AndrewMast, @taylorotwell could say that, but it seems I'll have to highlight the signature. * @param \Illuminate\Cache\Events\CacheEvent $eventframework/src/Illuminate/Cache/TaggedCache.php Lines 105 to 113 in 46ac782
I think it goes without saying why CacheEvent should be used, because the other option would be to change signatures here and in other packages like laravel-debugbar |
Hey, please tone down the passive aggressiveness. Why don't you open an PR that addresses this issue? There is no easy solution to this issue. The As you pointed out a few days ago, the
Or we could simply implement Edit: I just noticed you opened a PR, good work. I guess I need to eat my own words. Might want to change the signature to something like |
Sorry, I'm using Google Translate and I don't know if it translates exactly what I want to express.
could you open a PR that way? I don't understand it correctly, but I imagine that it would also change the signature for other packages.
Great
It is the most likely thing to happen |
Description:
Introduces
CacheFlushed
event dispatching when calling$cache->flush()
. Enables monitoring of full cache clearance for logging, auditing, or reactive workflows. Maintains backward compatibility.This PR resolves this issue