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

[V5] Avoid triggering eloquent.retrieved event #2490

Merged
merged 1 commit into from
Aug 30, 2023
Merged

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Aug 30, 2023

when hydrating the models that come from the cache, the retrieved event is being triggered, it should not be triggered because they are supposed to be preloaded from cache, this decreases performance
image

Illuminate/Database/Eloquent/Model.php#L625-L636, here is the source

Same for V6

@drbyte
Copy link
Collaborator

drbyte commented Aug 30, 2023

Thanks!

@drbyte drbyte merged commit b84f550 into spatie:v5 Aug 30, 2023
27 checks passed
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.

None yet

2 participants