Skip to content

Commit a47a73c

Browse files
committed
wip [skip ci]
1 parent 94254bb commit a47a73c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
7979
Book::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

8285
Be careful tho - specifying cache tags does not change the behaviour of key storage.

src/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)