Skip to content

Commit 0140cfe

Browse files
committed
Reverted TaggedCache and implemented the change to RedisTaggedCache
1 parent 2c2bf9c commit 0140cfe

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

src/Illuminate/Cache/RedisTaggedCache.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ public function flush()
8989
$this->deleteForeverKeys();
9090
$this->deleteStandardKeys();
9191

92-
return parent::flush();
92+
$this->tags->flush();
93+
94+
return true;
9395
}
9496

9597
/**

src/Illuminate/Cache/TaggedCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function decrement($key, $value = 1)
7878
*/
7979
public function flush()
8080
{
81-
$this->tags->flush();
81+
$this->tags->reset();
8282

8383
return true;
8484
}

tests/Cache/CacheTaggedCacheTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,6 @@ public function testRedisCacheTagsCanBeFlushed()
287287
$redis->flush();
288288
}
289289

290-
public function testTagFlushRemovesTag()
291-
{
292-
$store = new ArrayStore;
293-
$tags = ['bop'];
294-
$store->tags($tags)->put('foo', 'bar', 10);
295-
$store->tags($tags)->flush();
296-
$this->assertNull($store->get('tag:bop:key'));
297-
}
298-
299290
private function getTestCacheStoreWithTagValues(): ArrayStore
300291
{
301292
$store = new ArrayStore;

0 commit comments

Comments
 (0)