CacheConfig
in package
Table of Contents
Properties
- $_settings : array<string|int, mixed>
Methods
- __construct() : mixed
- CacheConfig constructor
- fromSettings() : self
- Create CacheConfig from settings source
- getCachePath() : string
- Get cache path
- getDefaultTtl() : int
- Get default TTL
- getGcDivisor() : int
- Get garbage collection divisor
- getGcProbability() : float
- Get garbage collection probability
- getRedisAuth() : string|null
- Get Redis auth
- getRedisConfig() : array<string|int, mixed>
- Get all Redis configuration as array
- getRedisDatabase() : int
- Get Redis database
- getRedisHost() : string
- Get Redis host
- getRedisPersistent() : bool
- Get Redis persistent connection setting
- getRedisPort() : int
- Get Redis port
- getRedisPrefix() : string
- Get Redis prefix
- getRedisTimeout() : float
- Get Redis timeout
- getStorageType() : string
- Get storage type
- isEnabled() : bool
- Check if cache is enabled
- isViewTypeEnabled() : bool
- Check if specific view type caching is enabled
Properties
$_settings
private
array<string|int, mixed>
$_settings
Methods
__construct()
CacheConfig constructor
public
__construct(array<string|int, mixed> $settings) : mixed
Parameters
- $settings : array<string|int, mixed>
fromSettings()
Create CacheConfig from settings source
public
static fromSettings(ISettingSource $settings) : self
Parameters
- $settings : ISettingSource
Return values
selfgetCachePath()
Get cache path
public
getCachePath() : string
Return values
stringgetDefaultTtl()
Get default TTL
public
getDefaultTtl() : int
Return values
intgetGcDivisor()
Get garbage collection divisor
public
getGcDivisor() : int
Return values
intgetGcProbability()
Get garbage collection probability
public
getGcProbability() : float
Return values
floatgetRedisAuth()
Get Redis auth
public
getRedisAuth() : string|null
Return values
string|nullgetRedisConfig()
Get all Redis configuration as array
public
getRedisConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>getRedisDatabase()
Get Redis database
public
getRedisDatabase() : int
Return values
intgetRedisHost()
Get Redis host
public
getRedisHost() : string
Return values
stringgetRedisPersistent()
Get Redis persistent connection setting
public
getRedisPersistent() : bool
Return values
boolgetRedisPort()
Get Redis port
public
getRedisPort() : int
Return values
intgetRedisPrefix()
Get Redis prefix
public
getRedisPrefix() : string
Return values
stringgetRedisTimeout()
Get Redis timeout
public
getRedisTimeout() : float
Return values
floatgetStorageType()
Get storage type
public
getStorageType() : string
Return values
stringisEnabled()
Check if cache is enabled
public
isEnabled() : bool
Return values
boolisViewTypeEnabled()
Check if specific view type caching is enabled
public
isViewTypeEnabled(string $viewType) : bool
Parameters
- $viewType : string