dwightwatson

dwightwatson/rememberable

PHP MIT Web Dev Single maintainer risk

Query caching for Laravel

1.1k stars
93 forks
slow
GitHub

1.1k

Stars

93

Forks

6

Open issues

11

Contributors

AI Analysis

Rememberable is a Laravel Eloquent trait that adds simple query result caching via a `remember()` method, storing results by SQL query hash and retrieving from cache on repeated calls. It's purpose-built for Laravel developers seeking to reduce database load through transparent query caching, and is not useful outside the Laravel ecosystem.

Web Dev Library Discovery value: 3/10
Documentation 8/10
Activity 6/10
Community 7/10
Code quality 5/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 7/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

laravel query-caching eloquent php performance
Actively maintained MIT licensed Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
1w ago

Lightweight query caching for Laravel Eloquent; minimal maintenance since 2015, narrow but stable adoption.

Rememberable is a Laravel package that adds convenient query caching via an Eloquent trait. It intercepts SQL queries and stores results in configurable cache backends (Redis, Memcached, etc.) for a specified duration. Used primarily by Laravel developers seeking transparent, per-query caching without altering application logic. Solves a narrow, specific problem — not query optimization or ORM improvements, but simple result caching with minimal boilerplate.

Origin

Created March 2015 as a thin wrapper around Laravel's native caching system. Gained modest traction (1,131 stars) as a convenience layer during Laravel 5.x era. Has evolved incrementally to support newer Laravel versions (now supporting Laravel 13), but never became core functionality, remaining a community-maintained optional addon.

Growth

Growth plateaued years ago. Gained approximately 1 star in the last 7 days (as of 2026-07-01). Peak adoption likely occurred 2015–2018. The project demonstrates zero explosive growth; instead it exhibits the pattern of a stable, niche utility — useful for its narrow audience but never positioning as a category leader or framework feature.

In production

Adoption not verified through the metadata provided. No deployment counts, known large user lists, or case studies mentioned in README. Packagist download statistics referenced in badge (not provided in data) would offer the only direct evidence. The 1,131 GitHub stars suggest some level of real-world use, but this is insufficient to quantify actual production adoption. Likely used by a subset of Laravel teams that explicitly choose transparent query caching, but scale is unclear.

Code analysis
Architecture

Based on README, the package implements a thin trait that wraps Eloquent query builders with `remember()` and `cacheTags()` methods. Likely caches by serializing the SQL query string and storing the result in Laravel's configured cache store. Does not appear to implement query analysis, invalidation strategies, or sophisticated cache-busting beyond manual tag flushing. Implementation details not verifiable from README alone.

Tests

Not documented in README. No mention of automated testing, test files, or CI/CD pipelines in the repository metadata provided.

Maintenance

Last push March 20, 2026 (approximately 3.5 months ago relative to analysis date 2026-07-01). This indicates recent maintenance activity and compatibility updates. Not stagnant, but update frequency appears reactive (responding to Laravel release cycles) rather than feature-driven. The package is actively maintained but at a low velocity, consistent with a stable, mature utility.

Honest verdict

ADOPT IF: you maintain a Laravel 5.x–13.x application, need transparent per-query result caching without application refactoring, and prefer explicit cache time windows over automatic invalidation. The package is stable, actively maintained for framework compatibility, and well-documented for its narrow scope. AVOID IF: you need sophisticated cache invalidation strategies, are uncertain whether your queries benefit from caching (profile first), or require cache coherence guarantees across distributed systems — this package does not solve those problems. MONITOR IF: you are running Laravel 13+ with `serializeable_classes` config (README flags a compatibility consideration that may require model setup changes).

Independent dimensions

Mainstream potential

3/10

Technical importance

4/10

Adoption evidence

3/10

Risks
  • Cache incoherence: Stale data is served until TTL expires or tags are manually flushed. No automatic invalidation on model updates, risking incorrect results if application logic does not manage cache lifecycle.
  • Serialization compatibility: README notes Laravel 13's stricter serialization rules require explicit allowlisting of model classes. Migration friction for older codebases.
  • Query-keying brittleness: Caching by SQL string means minor query changes create new cache entries, potentially defeating caching efficacy if queries are generated dynamically.
  • Redundancy with modern Laravel: Eloquent has supported native `remember()` since Laravel 6 (approx. 2019). Unclear if this package adds meaningful value over built-in functionality in current Laravel versions.
  • Limited adoption signals: No documented large-scale deployments, enterprise case studies, or ecosystem integration. Adoption appears limited to self-selecting teams that discover and choose the package; organic network effects are weak.
Prediction

Rememberable will likely remain a stable but slowly-declining package. As Laravel improves native caching support and the ecosystem matures, explicit caching via this trait may be gradually replaced by framework features or alternative caching patterns (e.g., repository layers, query objects). The package will not disappear but will see slower adoption of new major Laravel versions, eventual maintenance mode status, or transfer of stewardship. No indication of resurgence or significant new functionality.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

PHP
100%

Information

Language
PHP
License
MIT
Last updated
4mo ago
Created
138mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Recent releases

No releases published yet.

Similar repos

mike-bronner

mike-bronner/laravel-model-caching

This package adds automatic, self-invalidating caching to Laravel Eloquent...

2.4k PHP Web Dev
JosephSilber

JosephSilber/page-cache

Laravel Page Cache caches HTTP responses as static files on disk to serve pages...

1.3k PHP Web Dev
spatie

spatie/laravel-responsecache

A Laravel middleware package that caches entire HTTP responses (HTML, JSON) to...

2.8k PHP Web Dev
calebporzio

calebporzio/sushi

Sushi provides an in-memory array driver for Laravel's Eloquent ORM,...

3k PHP Web Dev
doctrine

doctrine/cache

Doctrine Cache is a caching component extracted from Doctrine Common that...

7.9k PHP
vs. alternatives
Doctrine/cache

Lower-level cache abstraction; more general-purpose, not Laravel-specific. Rememberable wraps this or similar for Eloquent convenience.

Spatie/laravel-query-builder

Query builder utility for filtering/sorting; orthogonal problem. Not a caching solution; focuses on API query parameterization.

Shopify/identity_cache (Ruby equivalent)

Larger Ruby ecosystem equivalent (1,966 stars). Similar architectural approach. Suggests market exists for transparent query caching in ORM frameworks.

Laravel native query caching

Laravel 6+ supports query result caching natively via `remember()` on query builders (built-in since ~2019). Rememberable may now be redundant for modern Laravel versions, though this package predates and may still be used for older projects or as a polished alternative.

Query optimization (indexing, N+1 fixes)

Solves a different problem. Caching masks slow queries; optimization prevents them. Rememberable is preventative performance, not root-cause.