NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #2795 most downloaded on Packagist
Automatic caching for Eloquent models.
Latest stable
13.2.2
Last release 18 days ago
30 Oct 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
185 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Committed items meant for 0.8.8.
Committed items meant for 0.8.8.
return type of applyScopes to match parent class.
applyScopes to match parent class.check for scopes to avoid them being applied twice. Thanks @saernz!
Your coding agent can read these notes before it upgrades. Set up the MCP server →
implementation of debug_backtrace() to reduce memory consumption. Thanks @saernz!
debug_backtrace() to reduce memory consumption. Thanks @saernz!PHP dependency version to ">=7.2.5" to be more inline with Laravel.
key generation to be more explicit in details with global scopes. Thanks @Drewdan!
initial tests for Nova integration. Thanks @dmason30!
issue with incorrectly adding to currentBinding if item was not in query binding. Thanks @irvine1231!
jsonContains() with array values. Thanks @dmason30!
jsonContains() with array values. Thanks @dmason30!truncate() to flush cache. Thanks @dmason30!### Added - Laravel 7 compatibility.
documentation to explain that database transactions are currently not supported.
$model->all() method. Thanks @titrxw!manual parameter binding in cache-key creation routines to be more robust.
improper caching of non-cachable eagerloaded relationships. Now any query with non-cachable eagerloaded relationships will not be cached in its entire
dependency version constraints.
### Added - Laravel 6.0 support.
caching of methods that could pass field names as string or array.
'modelCache:publish' artisan command.
config and environment variable to allow removal of database information from cache-key.
environment variable MODEL_CACHE_DISABLED to MODEL_CACHE_ENABLED to better conform to standards.
MODEL_CACHE_DISABLED to MODEL_CACHE_ENABLED to better conform to standards.all use of helper methods to allow non-Laravel apps to use this package:
parsing of soft-deleted-related queries:
parsing of global scopes. Rewrote how global scopes are analyzed to create appropriate cache key.
calling flushCache() on non-cachable related models.
flushCache() on non-cachable related models.Pushed changes intended for 0.5.1. Forgot to push changes to repo. 👀
Pushed changes intended for 0.5.1. Forgot to push changes to repo. 👀
caching of where clauses using DateTime instead of Carbon.
implementation of model-based cache prefix.
BelongsToMany relationship to not cache if the target model is not also cachable.
tests for lazy-loading the following relationships:
issue introduce in previous release related to cache cooldown and prefixes.
my own implementation of laravel pivot events, based on fico7489/laravel-pivot.
fico7489/laravel-pivot.fico7489/laravel-pivot.caching lazy-loading of belongs-to relationships. Thanks @tmishutin for leading the way forward on this effort! Hopefully this solution will work as a
work-around for Laravel Telescope compatibility to README.
polymorphic relationship caching, as well as other queries using InRaw.
InRaw.generation of cache key where clauses.
the way the database name is determined when creating the cache prefix.
bindings used in whereIn clauses.
whereIn clauses.where first() didn't pass an array parameter.
first() didn't pass an array parameter.helper function to run closure with model-caching disabled. Thanks for the suggestion, @mycarrysun
string and array helpers to use the Str and Arr classes directly, in preparation for helper deprecations in Laravel 5.9. Thanks @mycarrysun
Str and Arr classes directly, in preparation for helper deprecations in Laravel 5.9. Thanks @mycarrysunwhereIn was given an empty array. Thanks @Ben52useCacheCooldown to cacheCooldownSeconds in models.
useCacheCooldown to cacheCooldownSeconds in models.cache cool down functionality to not trigger if it is not set on the model. This should hopefully improve performance. Thanks @mycarrysun for implemen
laravel-pivot dependency back to that of the original owner, as Laravel 5.8 compatibility has been restored.
laravel-pivot dependency back to that of the original owner, as Laravel 5.8 compatibility has been restored.to rely on temporarily published mikebronner/laravel-pivot package on packagist.
mikebronner/laravel-pivot package on packagist.installation of patched laravel-pivot dependency.
laravel-pivot dependency.dependency constraints from 5.8 to 5.8.*.
5.8 to 5.8.*.using find() to get multiple items via an array. Thanks @cluebattery !
find() to get multiple items via an array. Thanks @cluebattery !functionality for caching of model relationships across different connections and databases. Thanks @PokeGuys for starting the conversation around thi
cache cooldown flush when cool-down seconds option was used.
laravel-pivot package compatibility temporarily with Laravel 5.8 patch of my own until they provide compatibility.
laravel-pivot package compatibility temporarily with Laravel 5.8 patch of my own until they provide compatibility.version requirements in composer.json.
composer.json.compatibility with previous versions of Laravel, as it was no longer sustainable with all the changes required.
depency laravel-pivot to next major release version, from a dev-version.
laravel-pivot to next major release version, from a dev-version.request() helper to app("request") for Lumen compatibility. Thanks @PokeGuysfunctionality to invalidate cache after running increment() and decrement() queries.
increment() and decrement() queries.tracking of model table in cache key for those using dynamic table names in models.
laravel-pivot package to use the new code branch which includes a fix for Laravel Telescope compatibility.relationship queries breaking on new where clause type InRaw.
InRaw.typo in method checkCooldownAndFlushAfterPersiting() to checkCooldownAndFlushAfterPersisting(); thanks @jacobzlogar!
checkCooldownAndFlushAfterPersiting() to
checkCooldownAndFlushAfterPersisting(); thanks @jacobzlogar!handling of whereJsonContains() and orWhereJsonContains().
whereJsonContains() and orWhereJsonContains().use of cache() helper method to app("cache") to allow for better Lumen compatibility. Thanks @nope7777!
cache() helper method to app("cache") to allow for better Lumen compatibility. Thanks @nope7777!codedungeon/phpunit-result-printer unit test output printer.forceDelete() in the Builder.### Added - Laravel 5.7 compatibility.
caching of subqueries of ->whereNotIn() and ->whereIn(). #149
->whereNotIn() and ->whereIn(). #149One column per quarter.