Skip to content

Commit cb55d37

Browse files
committed
Update documentation
1 parent e3d1fcb commit cb55d37

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.2.13] - 28 Dec 2017
8+
### Added
9+
- ability to define custom cache store in `.env` file.
10+
711
## [0.2.12] - 14 Dec 2017
812
### Added
913
- chainable method to disable caching of queries.

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ relationships. This package is the attempt to address those requirements.
2626
- PHP >= 7.0.0
2727
- Laravel 5.5
2828

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+
2945
## Usage
3046
For best performance a taggable cache provider is recommended (redis,
3147
memcached). While this is optional, using a non-taggable cache provider will
@@ -49,7 +65,7 @@ abstract class BaseModel extends CachedModel
4965
}
5066
```
5167

52-
### Disabling Caching of Queries
68+
### Optional Disabling Caching of Queries
5369
**Recommendation: add this to all your seeder queries to avoid pulling in
5470
cacched information when reseeding multiple times.**
5571
You can disable a given query by using `disableCache()` in the query chain, and

0 commit comments

Comments
 (0)