SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class File

File-based Cache driver.

Variables

NameVisibilityDescription
$directory 

Functions

NameVisibilityDescription
__constructpublicTests that the storage location is a directory and is writable.
deletepublicDeletes a cache item by id or tag
deleteExpiredpublicDeletes all cache files that are older than the current time.
existspublicFinds an array of files matching the given id or tag.
expiredprotectedCheck if a cache file has expired by filename.
findpublicFinds an array of ids for a given tag.
getpublicFetches a cache item. This will delete the item if it is expired or if
setpublicSets a cache item to the given data, tags, and lifetime.

public __construct

void $File->__construct ( mixed $directory );

Tests that the storage location is a directory and is writable.

public delete

boolean $File->delete ( string $id [, boolean $tag ] );

Deletes a cache item by id or tag

public deleteExpired

void $File->deleteExpired ( );

Deletes all cache files that are older than the current time.

public exists

array $File->exists ( string $id [, bool $tag ] );

Finds an array of files matching the given id or tag.

protected expired

bool $File->expired ( string $file );

Check if a cache file has expired by filename.

public find

array $File->find ( string $tag );

Finds an array of ids for a given tag.

public get

NULL|mixed $File->get ( string $id );

Fetches a cache item. This will delete the item if it is expired or if
the hash does not match the stored hash.

public set

bool $File->set ( string $id , string $data [, array $tags , integer $lifetime ] );

Sets a cache item to the given data, tags, and lifetime.