mixislv/laravel-model-self-cache
A Laravel package that gives Eloquent models self-caching capabilities, letting models cache their own queries and attributes automatically and invalidate cached data on create, update, or delete. Reduces repeated database hits with minimal changes to existing model code.
laravel-model-self-cache lets your Eloquent models cache themselves automatically, removing boilerplate cache logic from your application. Add the provided trait to a model and its queries, attributes, and lookups are served from Laravel's cache until the underlying data changes.
Cache invalidation is handled for you: saving, updating, or deleting a model clears its cached entries, so you never serve stale records. It works with any configured cache store and stays out of the way of your code.
How can I help you explore Laravel packages today?