File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
lib/Phpfastcache/Core/Pool Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -410,10 +410,6 @@ protected function driverWriteTags(ExtendedCacheItemInterface $item): bool
410
410
$ data = \array_merge ((array )$ data , [$ item ->getKey () => $ expTimestamp ]);
411
411
$ tagsItem ->set ($ data );
412
412
413
- if (!$ tagsItem ->isHit () || $ tagsItem ->getExpirationDate () < $ item ->getExpirationDate ()) {
414
- $ tagsItem ->expiresAt ($ item ->getExpirationDate ());
415
- }
416
-
417
413
/**
418
414
* Recalculate the expiration date
419
415
*
Original file line number Diff line number Diff line change 35
35
$ cacheInstance ->save ($ CachedString2 );
36
36
}
37
37
38
+ $ CachedString3 = $ cacheInstance ->getItem ("key_3 " );
39
+ if (is_null ($ CachedString3 ->get ())) {
40
+ $ CachedString3 ->set ("data3 " )->expiresAfter (4 );
41
+ $ CachedString3 ->addTag ("query " );
42
+ $ cacheInstance ->save ($ CachedString3 );
43
+ }
44
+
38
45
$ cacheInstance ->detachAllItems ();
39
46
$ testHelper ->printInfoText ('Items created and saved, sleeping 6 secondes to force "key_1" to expire ' );
40
47
sleep (6 );
You can’t perform that action at this time.
0 commit comments