BaseHandler
    
            
            in package
            
        
    
            
            implements
                            CacheInterface                    
    
    
Base class for cache handling
Tags
Table of Contents
Interfaces
Constants
- MAX_KEY_LENGTH = PHP_INT_MAX
- Maximum key length.
- RESERVED_CHARACTERS = '{}()/\@:'
- Reserved characters that cannot be used in a key or tag. May be overridden by the config.
Properties
- $prefix : string
- Prefix to apply to cache keys.
Methods
- deleteMatching() : int
- Deletes items from the cache store matching a given pattern.
- remember() : mixed
- Get an item from the cache, or execute the given Closure and store the result.
- validateKey() : string
- Validates a cache key according to PSR-6.
Constants
MAX_KEY_LENGTH
Maximum key length.
    public
        mixed
    MAX_KEY_LENGTH
    = PHP_INT_MAX
    
    
    
    
RESERVED_CHARACTERS
Reserved characters that cannot be used in a key or tag. May be overridden by the config.
in favor of the Cache config
    public
        mixed
    RESERVED_CHARACTERS
    = '{}()/\@:'
        From https://github.com/symfony/cache-contracts/blob/c0446463729b89dd4fa62e9aeecc80287323615d/ItemInterface.php#L43
Properties
$prefix
Prefix to apply to cache keys.
        protected
            string
    $prefix
    
        May not be used by all handlers.
Methods
deleteMatching()
Deletes items from the cache store matching a given pattern.
    public
                    deleteMatching(string $pattern) : int
    Parameters
- $pattern : string
- 
                    Cache items glob-style pattern 
Tags
Return values
intremember()
Get an item from the cache, or execute the given Closure and store the result.
    public
                    remember(string $key, int $ttl, callable(): mixed $callback) : mixed
    Parameters
- $key : string
- 
                    Cache item name 
- $ttl : int
- 
                    Time to live 
- $callback : callable(): mixed
- 
                    Callback return value 
validateKey()
Validates a cache key according to PSR-6.
    public
            static        validateKey(mixed $key[, string $prefix = '' ]) : string
    Keys that exceed MAX_KEY_LENGTH are hashed. From https://github.com/symfony/cache/blob/7b024c6726af21fd4984ac8d1eae2b9f3d90de88/CacheItem.php#L158
Parameters
- $key : mixed
- 
                    The key to validate 
- $prefix : string = ''
- 
                    Optional prefix to include in length calculations