File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,19 @@ You can either declare the default middleware, or you extend it by creating your
47
47
'rache' => \Rache\Middleware\CacheResponse::class,
48
48
```
49
49
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
+
50
63
### Rache Tags
51
64
52
65
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')
136
149
->name('posts.index');
137
150
```
138
151
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
+
139
160
### Flush the tags with route and data
140
161
141
162
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.
187
208
event or on custom event or an API trigger. You can use it anywhere, whenever a tag has been flushed it will clear all
188
209
the corresponding cache.
189
210
211
+
190
212
## Credits
191
213
192
214
- [ Kumaravel] ( https://github.com/theriddleofenigma )
You can’t perform that action at this time.
0 commit comments