1010[ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://raw.githubusercontent.com/GeneaLabs/laravel-model-caching/master/LICENSE )
1111
1212## Impetus
13- I created this package in response to a client project that had complex, nested
13+ I created this package in response to a client project that had complex and nested
1414forms with many ` <select> ` 's that resulted in over 700 database queries on one
1515page. I needed a package that abstracted the caching process out of the model
1616for me, and one that would let me cache custom queries, as well as cache model
17- relationships. This package is the attempt to address those requirements.
17+ relationships. This package is an attempt to address those requirements.
1818
1919## Features
2020- automatic, self-invalidating relationship (both eager- and lazy-loaded) caching.
@@ -36,7 +36,7 @@ composer require genealabs/laravel-model-caching
3636If you would like to use a different cache store than the default one used by
3737your Laravel application, you may do so by setting the ` MODEL_CACHE_STORE `
3838environment 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
39+ in ` config/cache.php ` (you can define any custom cache store based on your
4040specific needs there). For example:
4141```
4242MODEL_CACHE_STORE=redis
@@ -48,7 +48,7 @@ memcached). While this is optional, using a non-taggable cache provider will
4848mean that the entire cache is cleared each time a model is created, saved,
4949updated, or deleted.
5050
51- For ease of maintenance, I would recommend adding a ` BaseModel ` model that
51+ For the ease of maintenance, I would recommend adding a ` BaseModel ` model that
5252extends ` CachedModel ` , from which all your other models are extended. If you
5353don't want to do that, simply extend your models directly from ` CachedModel ` .
5454
@@ -66,7 +66,7 @@ abstract class BaseModel extends CachedModel
6666```
6767
6868### Exception: User Model
69- I would not recommend caching the user model, as it is a special case, since it
69+ I would not recommend caching the user model, as it is a special case since it
7070extends ` Illuminate\Foundation\Auth\User ` . Overriding that would break functionality.
7171Not only that, but it probably isn't a good idea to cache the user model anyway,
7272since you always want to pull the most up-to-date info on it.
@@ -100,7 +100,7 @@ you should see somewhere around 100% performance increase.
100100
101101## Commitment to Quality
102102During package development I try as best as possible to embrace good design and
103- development practices to try to ensure that this package is as good as it can
103+ development practices trying to ensure that this package is as good as it can
104104be. My checklist for package development includes:
105105
106106- ✅ Achieve as close to 100% code coverage as possible using unit tests.
0 commit comments