File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,9 @@ $shelfTwoBooks = Book::whereShelf(2)->cacheFor(60)->cacheTags(['shelf:2'])->get(
7777
7878// After flushing the cache for shelf:1, the query of$shelfTwoBooks will still hit the cache if re-called again.
7979Book::flushQueryCache(['shelf:1']);
80+
81+ // Flushing also works for both tags, invalidating them both, not just the one tagged with shelf:1
82+ Book::flushQueryCache(['shelf:1', 'shelf:2']);
8083```
8184
8285Be careful tho - specifying cache tags does not change the behaviour of key storage.
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ public function flushQueryCache(array $tags = []): bool
180180 }
181181
182182 /**
183- * Flush the cache for a specific tag
183+ * Flush the cache for a specific tag.
184184 *
185185 * @param string $tag
186186 * @return bool
You can’t perform that action at this time.
0 commit comments