Package suggestion: wddyousuf/eloquent-autocache — self-invalidating Eloquent query caching on any cache store #312
wddyousuf
started this conversation in
Package Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Package: wddyousuf/eloquent-autocache (Packagist)
Category suggestion: Database / Caching
What it does: Automatic, self-invalidating query caching for Eloquent models. Add one
Cacheabletrait and read queries are cached transparently; any write flushes the model's cache automatically.What makes it different from existing caching packages:
file,database,array, etc. No Redis/Memcached requirement.where()->update(), rawinsert/upsert/insertUsing, joined updates, andsaveQuietly()all flush correctly.find($id)caching that survives writes to other rows.AutoCache::fake()testing double with flush/hit/miss assertions.Supports: PHP 8.1+, Laravel 10/11/12. MIT licensed, CI matrix across PHP 8.1–8.3 × Laravel 10–12.
Full disclosure: I'm the author — the package is new (first release this week), so I understand if you'd prefer to revisit it once it's proven itself. The README includes an honest comparison table with laravel-model-caching, eloquent-query-cache, and lada-cache. Thanks for maintaining the directory! 💙
All reactions