class Cache implements FileTextCache, Flushable (View source)

Uses SS_Cache with a lifetime to cache extracted content

Traits

Provides extensions to this object to integrate it with standard config API methods.

Config options

lifetime int|null

Lifetime of cache in seconds Null defaults to 3600 (1 hour)

Properties

Methods

public static 
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

public
mixed
stat(string $name) deprecated

Get inherited config value

public
mixed
uninherited(string $name)

Gets the uninherited value for the given config option

public
$this
set_stat(string $name, mixed $value) deprecated

Update the config value for a given property

protected static 
CacheInterface
get_cache()

No description

protected
string
getKey(File $file)

No description

public
load(File $file)

No description

public
save(File $file, string $content)

No description

public static 
flush()

No description

public static 
void
clear()

Alias for $this->flush()

public
invalidate(File $file)

No description

Details

static Config_ForClass config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

Return Value

Config_ForClass

mixed stat(string $name) deprecated

deprecated 5.0 Use ->config()->get() instead

Get inherited config value

Parameters

string $name

Return Value

mixed

mixed uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

$this set_stat(string $name, mixed $value) deprecated

deprecated 5.0 Use ->config()->set() instead

Update the config value for a given property

Parameters

string $name
mixed $value

Return Value

$this

static protected CacheInterface get_cache()

No description

Return Value

CacheInterface

protected string getKey(File $file)

No description

Parameters

File $file

Return Value

string

load(File $file)

No description

Parameters

File $file

save(File $file, string $content)

No description

Parameters

File $file
string $content

static flush()

No description

static void clear()

Alias for $this->flush()

Return Value

void

invalidate(File $file)

No description

Parameters

File $file