rennokki/laravel-eloquent-query-cache
Full Changelog: https://github.com/renoki-co/laravel-eloquent-query-cache/compare/3.5.0...3.6.1
Full Changelog: https://github.com/renoki-co/laravel-eloquent-query-cache/compare/3.5.0...3.6.0
Full Changelog: https://github.com/renoki-co/laravel-eloquent-query-cache/compare/3.4.0...3.5.0
null in cacheForValue() actually hit the cache (https://github.com/renoki-co/laravel-eloquent-query-cache/pull/101)getCacheBaseTags method used self::class instead of the expected static::class (https://github.com/renoki-co/laravel-eloquent-query-cache/commit/69f16f9615bde4daf469e2aac46c34c23d551c79, 3.x ref: https://github.com/renoki-co/laravel-eloquent-query-cache/pull/96)getCacheBaseTags method used self::class instead of the expected static::class (https://github.com/renoki-co/laravel-eloquent-query-cache/pull/96)getCacheKey() being hardcoded as get (https://github.com/renoki-co/laravel-eloquent-query-cache/pull/94)Read the 3.x Documentation on Many-to-Many Automatic Cache Invalidation
getCacheTagsToInvalidateOnUpdate changed:For invalidation on many-to-many relations, $relation will be the name of the relation (posts, roles, etc.) while $pivotedModels will be a collection of models that got attached/detached/updated (Post, Role, etc.)
public function getCacheTagsToInvalidateOnUpdate($relation = null, $pivotedModels = null): array
{
//
}
dontCache() (https://github.com/renoki-co/laravel-eloquent-query-cache/pull/74)->get('something') would have thrown an error. (https://github.com/renoki-co/laravel-eloquent-query-cache/pull/56, https://github.com/renoki-co/laravel-eloquent-query-cache/pull/56/commits/4ca912a269eb7d64e85bec6bcb65fce40cc75019)->subSelect() with raw queries would have thrown an error. (https://github.com/renoki-co/laravel-eloquent-query-cache/pull/56, https://github.com/renoki-co/laravel-eloquent-query-cache/pull/56/commits/fb1367da65c463c565c5c72b8a8a46000e983c41)Security patches
appendCacheTags() to append tags during the query building (https://github.com/renoki-co/laravel-eloquent-query-cache/pull/38)selectSub() builder method (https://github.com/renoki-co/laravel-eloquent-query-cache/pull/38)boot() method with more appropriate implementation to avoid method overlaps (https://github.com/renoki-co/laravel-eloquent-query-cache/pull/33)Breaking changes:
boot() method within the model gets replacedPlease see the README docs about this breaking changes feature:
This update adds the ability to purge cache for all queries related to a model.
Since the tags that are used on cache calls changed, apps that already use the package in production and rely heavily on the cache might see spikes on database usage since the tags no longer match with the already-existing cache.
Make sure that you provide enough resources to supply the spike in usage.
See PR for all the changes: https://github.com/rennokki/laravel-eloquent-query-cache/pull/19
How can I help you explore Laravel packages today?