Is this Package Abandomed? #509
-
While it might offer efficiency, there are concerns about its long-term viability. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
@dutsik your concerns are warranted. Since initially developing the package, I have changed my stance on database caching and actually no longer recommend it. Many things have changed in the Laravel landscape, and with the introduction of Livewire, the entire page does not need to be front-loaded. Using a mix of database query optimization, Livewire, and intentional occasional caching mechanisms has proven to me to be far more useful than blanket-caching everything. Because of that, the fact that I no longer use this package myself, and my lack of availability, I have been pondering how I move forward with this package. I fully intend to get it updated to Laravel 12. However, I have to see if I open it up to a maintainer, or mark the package as deprecated, with Laravel 12 possibly being the last update. I would love to hear people's feedback on this. If you are still using the package, what is your use-case? Why is it important? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi there, we have installed your package on a SAAS for performance improvements on specific and highly requested high-level models. It seems to work pretty well for the moment, allowing us to reduce the number of database requests that were repeated before. It is a quite simple use case, only for a few models, but I think that your package is quite valuable for this kind of case (in case of multi-tenancy navigation for example). However, we are also concerned about maintenance issues if this package wouldn't be maintained anymore. We would in this case abandon its usage, in order to setup our own model caching solution. |
Beta Was this translation helpful? Give feedback.
-
@Okipa thank you for your feedback. Your use-case makes a lot of sense. Laravel 12 compatibility has just been added. My current plan is to keep the package functional, relying on community contributions for any big functional changes, and trying to keep it up-to-date with any Eloquent changes. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer! |
Beta Was this translation helpful? Give feedback.
-
Keeping this open for any feedback on use-cases others have as well. |
Beta Was this translation helpful? Give feedback.
-
I am using this package in production for 3.5 years in a SaaS.
I can wholeheartedly say that this packages has been a reliable timesaver. |
Beta Was this translation helpful? Give feedback.
-
Interesting, my biggest concern about this package is the way the cache auto-invalidâtes itself when a model is updated. I understand that you only use model caching on non-updatable models, which resolves this case. On our end, we are using it on models that can be updated at low frequency, but cache invalidating must be reliable when an update is triggered. I was wondering if you could give us the main principles of cache auto-invalidating of your package @mikebronner. How is this working and what caveats may we encounter ? I quickly started digging but it seems to rely on events, which is not so easy to track. |
Beta Was this translation helpful? Give feedback.
-
As long as you're using Eloquent so that you're triggering Model events, everything is handled here (except for the restore event when restoring models that were soft-deleted). Hence why I've mentioned the caveat above. One aspect that can be improved in this package would be a way of invalidating the cache directly from the code using a Facade after a mass assignment/update instead of having to rely on an Artisan call like: Artisan::call('modelCache:clear', ['--model' => 'App\Model']); |
Beta Was this translation helpful? Give feedback.
-
Thanks @daika7ana 🙏 @mikebronner I just seen a potential issue when using pivot models (https://laravel.com/docs/12.x/eloquent-relationships#defining-custom-intermediate-table-models). |
Beta Was this translation helpful? Give feedback.
@Okipa thank you for your feedback. Your use-case makes a lot of sense. Laravel 12 compatibility has just been added.
My current plan is to keep the package functional, relying on community contributions for any big functional changes, and trying to keep it up-to-date with any Eloquent changes.