File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
user_guide_src/source/libraries Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,27 @@ Class Reference
136136
137137 $cache->delete('cache_item_id');
138138
139+ .. php :method :: deleteMatching($pattern): bool
140+
141+ :param string $pattern: glob-style pattern to match cached items keys
142+ :returns: ``true `` on success, ``false `` if one of the deletes fails
143+ :rtype: bool
144+
145+ This method will delete multiple items from the cache store at once by
146+ matching their keys against a glob pattern.
147+ If one of the cache item deletion fails, the method will return FALSE.
148+
149+ .. important :: This method is only implemented for File, Redis and Predis handlers.
150+ Due to limitations, it couldn't be implemented for Memcached and Wincache handlers.
151+
152+ Example::
153+
154+ $cache->deleteMatching('prefix_*'); // deletes all keys starting with "prefix_"
155+ $cache->deleteMatching('*_suffix'); // deletes all keys ending with "_suffix"
156+
157+ For more information on glob-style syntax, please see
158+ `https://en.wikipedia.org/wiki/Glob_(programming) <https://en.wikipedia.org/wiki/Glob_(programming)#Syntax >`_.
159+
139160.. php :method :: increment($key[, $offset = 1]): mixed
140161
141162 :param string $key: Cache ID
You can’t perform that action at this time.
0 commit comments