com\setasign\SetaFramework\SimpleCache\Fastcache\Drivers\Redis
Driver
File: /SetaFramework/src/SimpleCache/Fastcache/Drivers/Redis/Driver.php
Class hierarchy
- Phpfastcache\Drivers\Redis\Driver
Implements
- \Phpfastcache\Cluster\AggregatablePoolInterface
- \Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface
- \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface
- \Phpfastcache\Event\EventManagerDispatcherInterface
- \Phpfastcache\Util\ClassNamespaceResolverInterface
- \Psr\Cache\CacheItemPoolInterface
Summary
Methods
- __construct()
- __driverBaseConstruct()
- appendItemsByTag()
- appendItemsByTags()
- assertCacheItemType()
- attachItem()
- cleanItemTags()
- clear()
- commit()
- decode()
- decrementItemsByTag()
- decrementItemsByTags()
- deleteItem()
- deleteItems()
- deleteItemsByTag()
- deleteItemsByTags()
- detachAllItems()
- detachItem()
- driverCheck()
- driverClear()
- driverConnect()
- driverDelete()
- driverDeleteMultiple()
- driverPreWrap()
- driverRead()
- driverReadAllKeys()
- driverReadMultiple()
- driverUnwrapCdate()
- driverUnwrapData()
- driverUnwrapEdate()
- driverUnwrapMdate()
- driverUnwrapTags()
- driverWrite()
- driverWriteMultiple()
- driverWriteTags()
- encode()
- fetchItemsByTagFromBackend()
- getAllItems()
- getClassName()
- getConfig()
- getDefaultConfig()
- getDriverName()
- getEncodedKey()
- getEventManager()
- getHelp()
- getIO()
- getInstanceId()
- getItem()
- getItems()
- getItemsAsJsonString()
- getItemsByTag()
- getItemsByTags()
- getItemsByTagsAsJsonString()
- getKeys()
- getStats()
- getTagKey()
- getTagKeys()
- handleExpiredCacheItem()
- hasEventManager()
- hasItem()
- incrementItemsByTag()
- incrementItemsByTags()
- isAggregatedBy()
- isAttached()
- prependItemsByTag()
- prependItemsByTags()
- save()
- saveDeferred()
- saveMultiple()
- setAggregatedBy()
- setConfig()
- setEventManager()
- setItem()
- throwUnsupportedDriverReadAllPattern()
- unserialize()
- validateCacheKeys()
Constants
DRIVER_CDATE_WRAPPER_INDEX
Creation date Index
DRIVER_CHECK_FAILURE
DRIVER_CONNECT_FAILURE
DRIVER_DATA_WRAPPER_INDEX
DRIVER_EDATE_WRAPPER_INDEX
Expiration date Index
DRIVER_KEY_WRAPPER_INDEX
DRIVER_MDATE_WRAPPER_INDEX
Modification date Index
DRIVER_TAGS_KEY_PREFIX
DRIVER_TAGS_WRAPPER_INDEX
MAX_ALL_KEYS_COUNT
Hard-limit count of items returns by getAllItems()
TAG_STRATEGY_ALL
Allows you to get cache item(s) by ALL of the specified matching tag(s) The cache item CAN have additional tag(s)
TAG_STRATEGY_ONE
Allows you to get cache item(s) by at least ONE of the specified matching tag(s). Default behavior
TAG_STRATEGY_ONLY
Allows you to get cache item(s) by ONLY the specified matching tag(s) The cache item CANNOT have additional tag(s)
Static Properties
$cacheItemClasses
-
$namespaces
-
$unsupportedKeyChars
-
Properties
$deferredList
-
$eventManager
-
$itemInstances
-
Static Methods
buildTokenClasses()
-
string $class,
string[] $classes,
int $index,
array<array<mixed>|string> $tokens
Parameters
- $namespace : string
- $class : string
- $classes : string[]
- $index : int
- $tokens : array<array<mixed>|string>
buildTokenNamespace()
-
array<array<mixed>|string> $tokens
Parameters
- $index : int
- $tokens : array<array<mixed>|string>
createClassMap()
-
Iterate over all files in the given directory searching for classes.
NOTICE: This method has been borrowed from Symfony ClassLoader 3.4 since they deprecated the whole component as of SF4. Our thanks to them.
Parameters
- $dir : string
The directory to search in or an iterator
Return Values
A class map array
findClasses()
-
Extract the classes in the given file.
NOTICE: This method has been borrowed from Symfony ClassLoader 3.4 since they deprecated the whole component as of SF4. Our thanks to them.
Parameters
- $path : string
The file to check
Return Values
The found classes
getClassNamespace()
-
getConfigClass()
-
Methods
__construct()
-
string $instanceId,
\Phpfastcache\Event\EventManagerInterface $em
Parameters
- $config : \Phpfastcache\Config\ConfigurationOptionInterface
- $instanceId : string
- $em : \Phpfastcache\Event\EventManagerInterface
__driverBaseConstruct()
-
string $instanceId,
\Phpfastcache\Event\EventManagerInterface $em
Driver constructor.
Parameters
- $config : \Phpfastcache\Config\ConfigurationOptionInterface
- $instanceId : string
- $em : \Phpfastcache\Event\EventManagerInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverCheckException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverConnectException
Throws \Phpfastcache\Exceptions\PhpfastcacheIOException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
appendItemsByTag()
-
array|string $data,
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagName : string
- $data : array|string
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \ReflectionException
appendItemsByTags()
-
array|string $data,
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagNames : array
- $data : array|string
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \ReflectionException
assertCacheItemType()
-
string $expectedClassType
Parameters
- $item : \Psr\Cache\CacheItemInterface
- $expectedClassType : string
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
attachItem()
-
Parameters
- $item : \Psr\Cache\CacheItemInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
cleanItemTags()
-
Parameters
- $item : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
clear()
-
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \Phpfastcache\Exceptions\PhpfastcacheIOException
commit()
-
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
decode()
-
Decode data stored in the cache for driver that does not support non-scalar value storage.
Parameters
- $value : ?string
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
decrementItemsByTag()
-
int $step = 1,
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagName : string
- $step : int
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \ReflectionException
decrementItemsByTags()
-
int $step = 1,
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagNames : array
- $step : int
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \ReflectionException
deleteItem()
-
Parameters
- $key : string
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
deleteItems()
-
Parameters
- $keys : array
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
deleteItemsByTag()
-
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagName : string
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
deleteItemsByTags()
-
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagNames : array
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
detachItem()
-
Parameters
- $item : \Psr\Cache\CacheItemInterface
driverConnect()
-
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
driverDelete()
-
string $encodedKey
Parameters
- $key : string
- $encodedKey : string
Exceptions
Throws \RedisException
driverDeleteMultiple()
-
Parameters
- $keys : string[]
driverPreWrap()
-
bool $stringifyDate = false
Parameters
- $item : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
- $stringifyDate : bool
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
driverRead()
-
Parameters
- $item : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
driverReadAllKeys()
-
Parameters
- $pattern : string
Exceptions
Throws \RedisException
driverReadMultiple()
-
Parameters
- $items : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \RedisException
driverUnwrapCdate()
-
Parameters
- $wrapper : array<string, mixed>
driverUnwrapData()
-
Parameters
- $wrapper : array<string, mixed>
Exceptions
Throws \Exception
driverUnwrapEdate()
-
Parameters
- $wrapper : array<string, mixed>
driverUnwrapMdate()
-
Parameters
- $wrapper : array<string, mixed>
driverUnwrapTags()
-
Parameters
- $wrapper : array<mixed>
driverWrite()
-
Parameters
- $item : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
driverWriteMultiple()
-
Parameters
- $item : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheUnsupportedMethodException
driverWriteTags()
-
Parameters
- $item : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
encode()
-
Encode data types such as object/array for driver that does not support non-scalar value
Parameters
- $data : mixed
fetchItemsByTagFromBackend()
-
Parameters
- $tagName : string
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
getAllItems()
-
Parameters
- $pattern : string
getConfig()
-
getDefaultConfig()
-
getEncodedKey()
-
Parameters
- $key : string
getEventManager()
-
getIO()
-
getItem()
-
Parameters
- $key : string
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
getItems()
-
Parameters
- $keys : array
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
getItemsAsJsonString()
-
int $options = \JSON_THROW_ON_ERROR,
int $depth = 512
Parameters
- $keys : array
- $options : int
- $depth : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
getItemsByTag()
-
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagName : string
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
getItemsByTags()
-
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagNames : array
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
getItemsByTagsAsJsonString()
-
int $option = \JSON_THROW_ON_ERROR,
int $depth = 512,
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagNames : array
- $option : int
- $depth : int
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
getKeys()
-
bool $encoded = false,
string $keyPrefix = ''
Parameters
- $items : \Phpfastcache\Core\Item\ExtendedCacheItemInterface[]
- $encoded : bool
- $keyPrefix : string
getStats()
-
getTagKey()
-
Parameters
- $key : string
getTagKeys()
-
Parameters
- $keys : array<string>
handleExpiredCacheItem()
-
Parameters
- $item : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
hasEventManager()
-
WARNING: This method is marked as deprecated!
Will be removed in v10
hasItem()
-
Parameters
- $key : string
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
incrementItemsByTag()
-
int $step = 1,
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagName : string
- $step : int
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \ReflectionException
incrementItemsByTags()
-
int $step = 1,
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagNames : array
- $step : int
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \ReflectionException
isAggregatedBy()
-
isAttached()
-
Parameters
- $item : \Psr\Cache\CacheItemInterface
prependItemsByTag()
-
array|string $data,
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagName : string
- $data : array|string
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \ReflectionException
prependItemsByTags()
-
array|string $data,
int $strategy = \Phpfastcache\Core\Pool\TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE
Parameters
- $tagNames : array
- $data : array|string
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \ReflectionException
save()
-
Parameters
- $item : \Psr\Cache\CacheItemInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheIOException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
saveDeferred()
-
Parameters
- $item : \Psr\Cache\CacheItemInterface
saveMultiple()
-
Parameters
- $items : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheCoreException
Throws \Phpfastcache\Exceptions\PhpfastcacheDriverException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
setAggregatedBy()
-
Parameters
- $clusterPool : \Phpfastcache\Cluster\ClusterPoolInterface
setConfig()
-
Parameters
- $config : \Phpfastcache\Config\ConfigurationOptionInterface
setEventManager()
-
Parameters
- $em : \Phpfastcache\Event\EventManagerInterface
setItem()
-
Parameters
- $item : \Psr\Cache\CacheItemInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
throwUnsupportedDriverReadAllPattern()
-
Parameters
- $linkReference : string
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
unserialize()
-
Parameters
- $value : ?string
validateCacheKeys()
-
Parameters
- $keys : string
