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

[11.x] Add get, write and forget cache events #51560

Merged
merged 4 commits into from
Jun 4, 2024

Conversation

stayallive
Copy link
Contributor

To allow tracing how long read/write cache operations take I've added events that fire before the already existing events that fired after calling the cache store. This makes it so that every cache operation has a "start" and "end" event that allows tracking the time between them.

To make sure every cache operation has a matching start and end event there are also 2 new failed events. The $result could also be added to the current events but not sure if it's a BC change to do that so instead I opted for the new failed events.

@Jacobs63
Copy link
Contributor

Kinda worried about performance degradation here, not a fan of this.

@stayallive
Copy link
Contributor Author

With #51032 (already release) you would be able to opt-out of these!

Not sure if it makes sense to make even more granular than that.

@taylorotwell taylorotwell merged commit 96eeea7 into laravel:11.x Jun 4, 2024
27 of 28 checks passed
@stayallive stayallive deleted the feature/cache-events branch July 1, 2024 10:19
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.

3 participants