Skip to content

Commit b09e1a6

Browse files
authored
Merge branch 'master' into laravel-5.5
2 parents cb55d37 + b0dccf8 commit b09e1a6

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ script:
1515

1616
after_success:
1717
- travis_retry php vendor/bin/php-coveralls -v
18+
19+
notifications:
20+
webhooks:
21+
urls:
22+
- https://webhooks.gitter.im/e/30886f28c25b1e31088f
23+
on_success: change # options: [always|never|change] default: always
24+
on_failure: always # options: [always|never|change] default: always
25+
on_start: never # options: [always|never|change] default: always

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![pexels-photo-325229](https://user-images.githubusercontent.com/1791050/30768358-0df9d0f2-9fbb-11e7-9f10-ad40b83bbf59.jpg)
22

33
# Model Caching for Laravel
4+
[![Gitter](https://badges.gitter.im/GeneaLabs/laravel-model-caching.svg)](https://gitter.im/GeneaLabs/laravel-model-caching?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge)
45
[![Travis](https://img.shields.io/travis/GeneaLabs/laravel-model-caching.svg)](https://travis-ci.org/GeneaLabs/laravel-model-caching)
56
[![SensioLabs Insight](https://img.shields.io/sensiolabs/i/fde269ac-c382-4d17-a647-c69ad6b9dd85.svg)](https://insight.sensiolabs.com/projects/fde269ac-c382-4d17-a647-c69ad6b9dd85)
67
[![Scrutinizer](https://img.shields.io/scrutinizer/g/GeneaLabs/laravel-model-caching.svg)](https://scrutinizer-ci.com/g/GeneaLabs/laravel-model-caching)
@@ -65,9 +66,15 @@ abstract class BaseModel extends CachedModel
6566
}
6667
```
6768

69+
### Exception: User Model
70+
I would not recommend caching the user model, as it is a special case, since it
71+
extends `Illuminate\Foundation\Auth\User`. Overriding that would break functionality.
72+
Not only that, but it probably isn't a good idea to cache the user model anyway,
73+
since you always want to pull the most up-to-date info on it.
74+
6875
### Optional Disabling Caching of Queries
6976
**Recommendation: add this to all your seeder queries to avoid pulling in
70-
cacched information when reseeding multiple times.**
77+
cached information when reseeding multiple times.**
7178
You can disable a given query by using `disableCache()` in the query chain, and
7279
it needs to be placed (anywhere) prior to the query command (`get()`, `all()`,
7380
`find()`, etc). For example:

0 commit comments

Comments
 (0)