Skip to content

Commit

Permalink
[ci skip] Add method to UG
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed May 5, 2021
1 parent 490abe8 commit cf52dda
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions user_guide_src/source/libraries/caching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,21 @@ Class Reference
on which adapter is being used. Some adapters (File, Memcached, Wincache)
still return ``false`` for missing items.

.. php:staticmethod:: validateKey(string $key, string $prefix)
:param string $key: Potential cache key
:param string $prefix: Optional prefix
:returns: The verified and prefixed key. If the key exceeds the driver's max key length it will be hashed.
:rtype: string

This method is used by handler methods to check that keys are valid. It will throw
an ``InvalidArgumentException`` for non-strings, invalid characters, and empty lengths.

Example::

$prefixedKey = BaseHandler::validateKey($key, $prefix);


*******
Drivers
*******
Expand Down

0 comments on commit cf52dda

Please sign in to comment.