File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
55and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
66
7+ ## [ 0.2.38] - 24 Feb 2018
8+ ### Added
9+ - cache-invalidation-cool-down functionality.
10+
11+ ## [ 0.2.37] - 23 Feb 2018
12+ ### Added
13+ - disabling of ` ->all() ` method caching via config flag.
14+
715## [ 0.2.36] - 23 Feb 2018
816### Added
917- config setting to allow disabling of model-caching.
@@ -15,6 +23,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1523### Added
1624- caching for ` paginate() ` ;
1725
26+ ## [ 0.2.34] - 21 Feb 2018
27+ ### Added
28+ - implementation tests using redis.
29+ - additional tests for some edge case scenarios.
30+
31+ ### Fixed
32+ - cache key prefix functionality.
33+
34+ ### Updated
35+ - tests through refactoring and cleaning up.
36+
1837## [ 0.2.33] - 19 Feb 2018
1938### Added
2039- unit test to make sure ` Model::all() ` returns a collection when only only
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ environment variable in your `.env` file to the name of a cache store configured
4141in ` config/cache.php ` (you can define any custom cache store based on your
4242specific needs there). For example:
4343```
44- MODEL_CACHE_STORE=redis
44+ MODEL_CACHE_STORE=redis2
4545```
4646
4747## Usage
@@ -105,7 +105,20 @@ extends `Illuminate\Foundation\Auth\User`. Overriding that would break functiona
105105Not only that, but it probably isn't a good idea to cache the user model anyway,
106106since you always want to pull the most up-to-date info on it.
107107
108- ### Optional Disabling Caching of Queries
108+ ### Experimental: Cache Cool-down In Specific Models
109+ In some instances, you may want to add a cache invalidation cool-down period.
110+ For example you might have a busy site where comments are submitted at a high
111+ rate, and you don't want every comment submission to invalidate the cache. While
112+ I don't necessarily recommend this, you might experiment it's effectiveness.
113+
114+ It can be implemented like so:
115+ ``` php
116+ (new Comment)
117+ ->withCacheCooldownSeconds(30)
118+ ->get();
119+ ```
120+
121+ ### Disabling Caching of Queries
109122There are two methods by which model-caching can be disabled:
1101231 . Use ` ->disableCache() ` in a query-by-query instance.
1111242 . Set ` MODEL_CACHE_DISABLED=TRUE ` in your ` .env ` file.
You can’t perform that action at this time.
0 commit comments