-
Notifications
You must be signed in to change notification settings - Fork 210
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
Retrieved Observer not firing from CachedBuilder #399
Comments
Hi @paularmstrong80, thanks for moving this over to a new issue. I'm going to have to ponder this a bit, but I can see where you're coming from. |
Coming from this exact same issue (getting |
There is a event Illuminate\Cache\Events\CacheHit which might be useful to you |
Hi Mike,
First, thank you for the great package, really appreciate your work!
I came across this issue when attempting to hook into the model's retrieved event.
The retrieved event only fires if the result hasn't been cached. Once the result is in cache, it no longer fires.
To work around the issue I had to do the following:
My solution is not pretty, but works. I had troubles doing it other ways because of the debug_backtrace in the cacheValue event.
If there's a way to improve this solution, and/or get it into core, that would be amazing.
Kind Regards,
Paul
Originally posted by @paularmstrong80 in #171 (comment)
The text was updated successfully, but these errors were encountered: