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.
4
4
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
5
5
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
6
6
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
+
7
15
## [ 0.2.36] - 23 Feb 2018
8
16
### Added
9
17
- 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.
15
23
### Added
16
24
- caching for ` paginate() ` ;
17
25
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
+
18
37
## [ 0.2.33] - 19 Feb 2018
19
38
### Added
20
39
- 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
41
41
in ` config/cache.php ` (you can define any custom cache store based on your
42
42
specific needs there). For example:
43
43
```
44
- MODEL_CACHE_STORE=redis
44
+ MODEL_CACHE_STORE=redis2
45
45
```
46
46
47
47
## Usage
@@ -105,7 +105,20 @@ extends `Illuminate\Foundation\Auth\User`. Overriding that would break functiona
105
105
Not only that, but it probably isn't a good idea to cache the user model anyway,
106
106
since you always want to pull the most up-to-date info on it.
107
107
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
109
122
There are two methods by which model-caching can be disabled:
110
123
1 . Use ` ->disableCache() ` in a query-by-query instance.
111
124
2 . Set ` MODEL_CACHE_DISABLED=TRUE ` in your ` .env ` file.
You can’t perform that action at this time.
0 commit comments