class tidy_cache extends base

Tidy cache cron task.

Properties

protected $config
protected $cache

Methods

string
get_name()

Returns the name of the task.

from  base
set_name(string $name)

Sets the name of the task.

from  base
bool
is_runnable()

Returns whether this cron task can run, given current board configuration.

bool
should_run()

Returns whether this cron task should run now, because enough time has passed since it was last run.

__construct(config $config, driver_interface $cache)

Constructor.

null
run()

Runs this cron task.

Details

in base at line 34
string get_name()

Returns the name of the task.

Return Value

string

Name of wrapped task.

in base at line 44
set_name(string $name)

Sets the name of the task.

Parameters

string $name

The task name

at line 54
bool is_runnable()

Returns whether this cron task can run, given current board configuration.

Tidy cache cron task runs if the cache implementation in use supports tidying.

Return Value

bool

at line 68
bool should_run()

Returns whether this cron task should run now, because enough time has passed since it was last run.

The interval between cache tidying is specified in board configuration.

Return Value

bool

at line 30
__construct(config $config, driver_interface $cache)

Constructor.

Parameters

config $config

The config

driver_interface $cache

The cache driver

at line 41
null run()

Runs this cron task.

Return Value

null