class ExpensiveCache extends Cache (View source)

Class ExpensiveCache This cache stores data that is expensive to build that will see a performance boost if stored on disk.

\@package Concrete\Core\Cache\Level

Properties

Pool $pool from  Cache
protected bool $enabled from  Cache
protected DriverInterface $driver from  Cache

Methods

__construct()

No description

from  Cache
init()

Initializes the cache by setting up the cache pool and enabling the cache.

DriverInterface
loadConfig($level)

Loads the composite driver from constants.

from  Cache
bool
delete(string $key)

Deletes an item from the cache.

from  Cache
bool
exists(string $key)

Checks if an item exists in the cache.

from  Cache
flush()

Removes all values from the cache.

from  Cache
ItemInterface
getItem(string $key)

Gets a value from the cache.

from  Cache
save(CacheItemInterface $item)

No description

from  Cache
enable()

Enables the cache.

from  Cache
disable()

Disables the cache.

from  Cache
bool
isEnabled()

Returns true if the cache is enabled, false if not.

from  Cache
static 
disableAll()

Disables all cache levels.

from  Cache
static 
enableAll()

Enables all cache levels.

from  Cache

Details

__construct()

No description

protected init()

Initializes the cache by setting up the cache pool and enabling the cache.

protected DriverInterface loadConfig($level)

Loads the composite driver from constants.

Parameters

$level

Return Value

DriverInterface

bool delete(string $key)

Deletes an item from the cache.

Parameters

string $key

Name of the cache item ID

Return Value

bool

True if deleted, false if not

bool exists(string $key)

Checks if an item exists in the cache.

Parameters

string $key

Name of the cache item ID

Return Value

bool

True if exists, false if not

flush()

Removes all values from the cache.

ItemInterface getItem(string $key)

Gets a value from the cache.

Parameters

string $key

Name of the cache item ID

Return Value

ItemInterface

save(CacheItemInterface $item)

No description

Parameters

CacheItemInterface $item

enable()

Enables the cache.

disable()

Disables the cache.

bool isEnabled()

Returns true if the cache is enabled, false if not.

Return Value

bool

static disableAll()

Disables all cache levels.

static enableAll()

Enables all cache levels.