simplesoftwareio/simple-cache
A lightweight Laravel helper for cleaner cache usage, wrapping the cache repository with simple remember and forget methods so you can store and retrieve values without repetitive boilerplate.
Cache::remember wrapping query results plus invalidation on saved/deleted model events). That is a decision point, not a dependency: the PM question is whether to add a third-party trait, write the equivalent in-house in under a day, or lean on Laravel's first-party Cache facade and remember() directly.Consider it only when:
Look elsewhere when:
Cache store changes. Assume it does not work until proven otherwise.Maintained alternatives to evaluate instead: Laravel's native Cache::remember plus model events, geneaLabs/laravel-model-caching (query-level caching with tag support), or spatie/laravel-responsecache if the actual goal is HTTP-level caching rather than model-level.
For executives (one paragraph): We evaluated simplesoftwareio/simple-cache, a small MIT-licensed Laravel trait that caches Eloquent model queries and clears them on save/delete. It addresses a real cost — repeated database reads on slow-changing data — but it is not a dependency we should take on: the last release was 2016, it has 23 stars and zero downstream dependents, and it targets a Laravel generation we have moved past. The capability it offers is roughly a day of engineering to replicate on top of Laravel's first-party cache. Recommendation: do not adopt as a dependency. Use Laravel's built-in caching for the same outcome, spend the saved effort on invalidation correctness and cache observability, and treat this package as a pattern reference only.
For engineering: The package's proposition — a trait that wraps model reads in Cache::remember and hooks saved/deleted for invalidation — is sound and matches the framework's own idiom, but the implementation is frozen at the Laravel 5.3/5.4 era with no PHP 8 or modern Laravel support, no maintenance, and no downstream users to surface breakage. The invalidation model is coarse (whole-model event-based) and will not cover bulk updates, update() on query builders, or direct DB writes — the classic stale-cache failure modes. If we want this, we implement it in-house against the native Cache facade with explicit cache keys, tag support where the store allows, and tests covering invalidation paths; or we adopt a maintained package only if we need query-level caching with tagging and multi-tenant isolation. Do not add this to composer.json.
How can I help you explore Laravel packages today?