Neuron-PHP

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>

getCachePath()

Get cache path

public getCachePath() : string
Return values
string

getDefaultTtl()

Get default TTL

public getDefaultTtl() : int
Return values
int

getGcDivisor()

Get garbage collection divisor

public getGcDivisor() : int
Return values
int

getGcProbability()

Get garbage collection probability

public getGcProbability() : float
Return values
float

getRedisAuth()

Get Redis auth

public getRedisAuth() : string|null
Return values
string|null

getRedisConfig()

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
int

getRedisHost()

Get Redis host

public getRedisHost() : string
Return values
string

getRedisPersistent()

Get Redis persistent connection setting

public getRedisPersistent() : bool
Return values
bool

getRedisPort()

Get Redis port

public getRedisPort() : int
Return values
int

getRedisPrefix()

Get Redis prefix

public getRedisPrefix() : string
Return values
string

getRedisTimeout()

Get Redis timeout

public getRedisTimeout() : float
Return values
float

getStorageType()

Get storage type

public getStorageType() : string
Return values
string

isEnabled()

Check if cache is enabled

public isEnabled() : bool
Return values
bool

isViewTypeEnabled()

Check if specific view type caching is enabled

public isViewTypeEnabled(string $viewType) : bool
Parameters
$viewType : string
Return values
bool

        
On this page

Search results