File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Laravel Eloquent Query Cache
1212Laravel Eloquent Query Cache brings back the ` remember() ` functionality that has been removed from Laravel a long time ago.
1313It adds caching functionalities directly on the Eloquent level, making use of cache within your database queries.
1414
15- ## Installing the package
15+ # Installing the package
1616
1717Hop into your console and install the package via Composer:
1818
@@ -67,7 +67,7 @@ $postsCount = Post::cacheFor(60 * 60)->count();
6767$postsCount = Post::cacheFor(now()->addDays(1))->count();
6868```
6969
70- ## Cache Tags & Cache Invalidation
70+ # Cache Tags & Cache Invalidation
7171
7272Some caching stores accept tags. This is really useful if you plan on tagging your cached queries and invalidate only some of the queries when needed.
7373
@@ -104,7 +104,7 @@ $bob = Kid::whereName('Bob')
104104 ->first();
105105```
106106
107- ### Global Cache Invalidation
107+ ## Global Cache Invalidation
108108
109109To invalidate all the cache for a specific model, use the ` flushQueryCache ` method without passing the tags.
110110
@@ -201,6 +201,8 @@ class Book extends Model
201201}
202202```
203203
204+ # Advanced
205+
204206## Implement the caching method to your own Builder class
205207
206208Since this package modifies the ` newBaseQueryBuilder() ` in the model, having multiple traits that
You can’t perform that action at this time.
0 commit comments