File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ public function flush()
71
71
*
72
72
* @param string $name
73
73
*/
74
- public function resetTag ($ name )
74
+ public function flushTag ($ name )
75
75
{
76
76
$ this ->store ->forget ($ this ->tagKey ($ name ));
77
77
}
Original file line number Diff line number Diff line change @@ -282,11 +282,20 @@ public function testRedisCacheTagsCanBeFlushed()
282
282
$ conn ->shouldReceive ('del ' )->once ()->with ('prefix:foo:standard_ref ' );
283
283
$ conn ->shouldReceive ('del ' )->once ()->with ('prefix:bar:standard_ref ' );
284
284
285
- $ tagSet ->shouldReceive ('reset ' )->once ();
285
+ $ tagSet ->shouldReceive ('flush ' )->once ();
286
286
287
287
$ redis ->flush ();
288
288
}
289
289
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
+
290
299
private function getTestCacheStoreWithTagValues (): ArrayStore
291
300
{
292
301
$ store = new ArrayStore ;
You can’t perform that action at this time.
0 commit comments