Skip to content

Commit 7fb08e1

Browse files
committed
Update documentation
1 parent 0b0a5bb commit 7fb08e1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
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.9] - 14 Dec 2017
8+
### Added
9+
- chainable method to disable caching of queries.
10+
711
## [0.2.8] - 2017-10-17
812
### Updated
913
- code with optimizations and refactoring.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ abstract class BaseModel extends CachedModel
4949
}
5050
```
5151

52+
### Disabling Caching of Queries
53+
**Recommendation: add this to all your seeder queries to avoid pulling in
54+
cacched information when reseeding multiple times.**
55+
You can disable a given query by using `disableCache()` in the query chain, and
56+
it needs to be placed (anywhere) prior to the query command (`get()`, `all()`,
57+
`find()`, etc). For example:
58+
```php
59+
$results = $myModel->disableCache()->all();
60+
```
61+
5262
**That's all you need to do. All model queries and relationships are now
5363
cached!**
5464

0 commit comments

Comments
 (0)