File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
lib/Phpfastcache/Core/Pool Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## 8.1.4
2
+ #### _ "Masks fell, for good.."_
3
+ ##### 12 february 2023
4
+ - __ Core__
5
+ - Fixed #893 // getItemsByTag() - empty after one item has expired
6
+
1
7
## 8.1.3
2
8
#### _ "Don't throw the masks, yet."_
3
9
##### 25 may 2022
Original file line number Diff line number Diff line change @@ -361,8 +361,17 @@ protected function driverWriteTags(ExtendedCacheItemInterface $item): bool
361
361
* that has slow performances
362
362
*/
363
363
364
- $ tagsItem ->set (\array_merge ((array )$ data , [$ item ->getKey () => $ expTimestamp ]))
365
- ->expiresAt ($ item ->getExpirationDate ());
364
+ $ data = \array_merge ((array )$ data , [$ item ->getKey () => $ expTimestamp ]);
365
+ $ tagsItem ->set ($ data );
366
+
367
+ /**
368
+ * Recalculate the expiration date
369
+ *
370
+ * If the $tagsItem does not have
371
+ * any cache item references left
372
+ * then remove it from tagsItems index
373
+ */
374
+ $ tagsItem ->expiresAt ((new DateTime ())->setTimestamp (max ($ data )));
366
375
367
376
$ this ->driverWrite ($ tagsItem );
368
377
$ tagsItem ->setHit (true );
You can’t perform that action at this time.
0 commit comments