File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
user_guide_src/source/libraries Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,21 @@ Class Reference
229229 on which adapter is being used. Some adapters (File, Memcached, Wincache)
230230 still return ``false `` for missing items.
231231
232+ .. php :staticmethod :: validateKey(string $key, string $prefix)
233+
234+ :param string $key: Potential cache key
235+ :param string $prefix: Optional prefix
236+ :returns: The verified and prefixed key. If the key exceeds the driver's max key length it will be hashed.
237+ :rtype: string
238+
239+ This method is used by handler methods to check that keys are valid. It will throw
240+ an ``InvalidArgumentException `` for non-strings, invalid characters, and empty lengths.
241+
242+ Example::
243+
244+ $prefixedKey = BaseHandler::validateKey($key, $prefix);
245+
246+
232247*******
233248Drivers
234249*******
You can’t perform that action at this time.
0 commit comments