File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ 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.13] - 28 Dec 2017
8
+ ### Added
9
+ - ability to define custom cache store in ` .env ` file.
10
+
7
11
## [ 0.2.12] - 14 Dec 2017
8
12
### Added
9
13
- chainable method to disable caching of queries.
Original file line number Diff line number Diff line change @@ -26,6 +26,22 @@ relationships. This package is the attempt to address those requirements.
26
26
- PHP >= 7.0.0
27
27
- Laravel 5.5
28
28
29
+ ## Installation
30
+ ```
31
+ composer require genealabs/laravel-model-caching
32
+ ```
33
+
34
+ ## Configuration
35
+ ### Optional Custom Cache Store
36
+ If you would like to use a different cache store than the default one used by
37
+ your Laravel application, you may do so by setting the ` MODEL_CACHE_STORE `
38
+ environment variable in your ` .env ` file to the name of a cache store configured
39
+ in ` config/cache.php ` (you can define any custom cache store base on your
40
+ specific needs there). For example:
41
+ ```
42
+ MODEL_CACHE_STORE=redis
43
+ ```
44
+
29
45
## Usage
30
46
For best performance a taggable cache provider is recommended (redis,
31
47
memcached). While this is optional, using a non-taggable cache provider will
@@ -49,7 +65,7 @@ abstract class BaseModel extends CachedModel
49
65
}
50
66
```
51
67
52
- ### Disabling Caching of Queries
68
+ ### Optional Disabling Caching of Queries
53
69
** Recommendation: add this to all your seeder queries to avoid pulling in
54
70
cacched information when reseeding multiple times.**
55
71
You can disable a given query by using ` disableCache() ` in the query chain, and
You can’t perform that action at this time.
0 commit comments