Skip to content

Commit ea6ebcc

Browse files
author
Kumaravel
committed
Updated the readme file for adding flush all method reference and setting the rache driver env.
1 parent c551bbd commit ea6ebcc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ You can either declare the default middleware, or you extend it by creating your
4747
'rache' => \Rache\Middleware\CacheResponse::class,
4848
```
4949

50+
### Setting the Driver
51+
52+
Make sure to set the rache driver in the <b>.env</b> file with the corresponding driver name which you want to use.
53+
54+
```
55+
RACHE_DRIVER=redis // It uses laravel cache system behind the scenes.
56+
```
57+
58+
#### Note
59+
60+
Since rache uses Laravel Cache Tags behind the scenes it contains the same limitations as Laravel Cache tags. Cache tags
61+
aren't supported when using the `file`, `dynamodb`, or `database` cache drivers.
62+
5063
### Rache Tags
5164

5265
Rache tags acts as label for settings up the cache against some data. `Auth`, `Request`, and `Pagination` tags are added
@@ -136,6 +149,14 @@ Route::get('/posts', 'PostController@index')
136149
->name('posts.index');
137150
```
138151

152+
### Flush all the cached responses
153+
154+
By calling the flushAll, you can clear all the cached response in the application.
155+
156+
```injectablephp
157+
Rache::flushAll();
158+
```
159+
139160
### Flush the tags with route and data
140161

141162
You can flush the cache by using `Rache::flushTag({tag-name}, {options:[route, data]})`. We can find some real-time
@@ -187,6 +208,7 @@ You can flush any type of tag along with route name or data based on your need.
187208
event or on custom event or an API trigger. You can use it anywhere, whenever a tag has been flushed it will clear all
188209
the corresponding cache.
189210

211+
190212
## Credits
191213

192214
- [Kumaravel](https://github.com/theriddleofenigma)

0 commit comments

Comments
 (0)