File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
lib/Phpfastcache/Core/Pool Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ PhpFastCache provides you a lot of useful APIs:
109109| ` deleteItem($key) ` | bool | Deletes an item |
110110| ` deleteItems(array $keys) ` | bool | Deletes one or more items |
111111| ` deleteItemsByTag($tagName) ` | bool | Deletes items by a tag |
112- | ` deleteItemsByTags(array $tagNames) ` | bool | Deletes items by one of multiple tag names |
112+ | ` deleteItemsByTags(array $tagNames, int $strategy ) ` | bool | Deletes items by one of multiple tag names |
113113| ` detachItem($item) ` | void | Detaches an item from the pool |
114114| ` getConfig() ` | ConfigurationOption | Returns the configuration object |
115115| ` getConfigOption($optionName); ` | mixed | Returns a configuration value by its key ` $optionName ` |
Original file line number Diff line number Diff line change @@ -127,8 +127,9 @@ protected function getTagKey(string $key): string
127127 public function deleteItemsByTags (array $ tagNames , int $ strategy = TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE ): bool
128128 {
129129 $ return = null ;
130- foreach ($ tagNames as $ tagName ) {
131- $ result = $ this ->deleteItemsByTag ($ tagName , $ strategy );
130+
131+ foreach ($ this ->getItemsByTags ($ tagNames , $ strategy ) as $ item ) {
132+ $ result = $ this ->deleteItem ($ item ->getKey ());
132133 if ($ return !== false ) {
133134 $ return = $ result ;
134135 }
You can’t perform that action at this time.
0 commit comments