diff --git a/docs/guide/caching-data.md b/docs/guide/caching-data.md index bd1fa881e4..519cb6ddf1 100644 --- a/docs/guide/caching-data.md +++ b/docs/guide/caching-data.md @@ -320,19 +320,6 @@ Since 2.0.14 you can use the following shortcuts: User::find()->cache(7200)->all(); ``` -### Cache Flushing - -When you need to invalidate all the stored cache data, you can call [[yii\caching\Cache::flush()]]. - -You can flush the cache from the console by calling `yii cache/flush` as well. - - `yii cache`: lists the available caches in application - - `yii cache/flush cache1 cache2`: flushes the cache components `cache1`, `cache2` (you can pass multiple component - names separated with space) - - `yii cache/flush-all`: flushes all cache components in the application - -> Info: Console application uses a separate configuration file by default. Ensure, that you have the same caching -components in your web and console application configs to reach the proper effect. - ### Configurations @@ -427,3 +414,17 @@ Some caching storage has size limitation. For example, memcache limits the maxim of each entry to be 1MB. Therefore, if the size of a query result exceeds this limit, the caching will fail. + +## Cache Flushing + +When you need to invalidate all the stored cache data, you can call [[yii\caching\Cache::flush()]]. + +You can flush the cache from the console by calling `yii cache/flush` as well. + - `yii cache`: lists the available caches in application + - `yii cache/flush cache1 cache2`: flushes the cache components `cache1`, `cache2` (you can pass multiple component + names separated with space) + - `yii cache/flush-all`: flushes all cache components in the application + +> Info: Console application uses a separate configuration file by default. Ensure, that you have the same caching +components in your web and console application configs to reach the proper effect. +