File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 22
33* onCacheGetItem
44 * Allow you to manipulate an item just before it gets returned by the getItem() method.
5+ onCacheDeleteItem
6+ * Allow you to manipulate an item just before it gets returned by the getItem() method.
57* onCacheSaveItem
68 * Allow you to manipulate an item just before it gets saved by the driver.
79* onCacheSaveDeferredItem
Original file line number Diff line number Diff line change @@ -188,6 +188,14 @@ public function deleteItem($key)
188188 if ($ this ->hasItem ($ key ) && $ this ->driverDelete ($ item )) {
189189 $ item ->setHit (false );
190190 CacheManager::$ WriteHits ++;
191+
192+ /**
193+ * @eventName CacheCommitItem
194+ * @param $this ExtendedCacheItemPoolInterface
195+ * @param $item ExtendedCacheItemInterface
196+ */
197+ $ this ->eventManager ->dispatch ('CacheDeleteItem ' , $ this , $ item );
198+
191199 /**
192200 * De-register the item instance
193201 * then collect gc cycles
Original file line number Diff line number Diff line change 2020 *
2121 * == ItemPool Events ==
2222 * @method Void onCacheGetItem() onCacheGetItem(Callable $callable)
23+ * @method Void onCacheDeleteItem() onCacheDeleteItem(Callable $callable)
2324 * @method Void onCacheSaveItem() onCacheSaveItem(Callable $callable)
2425 * @method Void onCacheSaveDeferredItem() onCacheSaveDeferredItem(Callable $callable)
2526 * @method Void onCacheCommitItem() onCacheCommitItem(Callable $callable)
You can’t perform that action at this time.
0 commit comments