diff --git a/CHANGELOG.md b/CHANGELOG.md index 4867625..a920b8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.2.14] - 30 Dec 2017 +### Added +- ability to flush cache for a given model via Artisan command. + ## [0.2.13] - 28 Dec 2017 ### Added - ability to define custom cache store in `.env` file. diff --git a/README.md b/README.md index 23dd405..11a0ab9 100644 --- a/README.md +++ b/README.md @@ -82,12 +82,22 @@ it needs to be placed (anywhere) prior to the query command (`get()`, `all()`, $results = $myModel->disableCache()->all(); ``` +### Manual Flushing of Specific Model +You can flush the cache of a specific model using the following artisan command: +```sh +php artisan modelCaching:flush --model=App\Model +``` + +This comes in handy when manually making updates to the database. You could also +trigger this after making updates to the database from sources outside your +Laravel app. + +## Summary **That's all you need to do. All model queries and relationships are now cached!** In testing this has optimized performance on some pages up to 900%! Most often -you should see somewhere around 100% performance increase. (I will show some -concrete examples here soon, still working on optimizing things first.) +you should see somewhere around 100% performance increase. ## Commitment to Quality During package development I try as best as possible to embrace good design and