CMS Made Simple API

cms_filecache_driver extends cms_cache_driver
in package

A cache driver to cache files using the filesystem.

This driver stores files in the CMSMS TMP_CACHE location. Supports read, and write locking a settable cache lifetime, md5 encoded keys and groups so that filenames cannot be easily determined, and automatic cleaning.

Tags
license

GPL

since
2.0
author

Robert Campbell

Table of Contents

Methods

__construct()  : mixed
Constructor
clear()  : mixed
Clear all cached values from a group if the $group parameter is not specified the current group will be used
erase()  : mixed
Erase a cached value if the $group parameter is not specified the current group will be used
exists()  : bool
Test if a cached value exists.
get()  : mixed
Get a cached value if the $group parameter is not specified the current group will be used
set()  : mixed
Set a cached value if the $group parameter is not specified the current group will be used
set_group()  : mixed
Set the current group

Methods

__construct()

Constructor

public __construct(string $opts) : mixed

Accepts an associative array of options as follows: lifetime => seconds (default 3600) locking => boolean (default false) cache_dir => string (default TMP_CACHE_LOCATION) auto_cleaning => boolean (default false) blocking => boolean (default false) grouop => string (no default)

Parameters
$opts : string

clear()

Clear all cached values from a group if the $group parameter is not specified the current group will be used

public clear([string $group = '' ]) : mixed
Parameters
$group : string = ''
Tags
see
cms_filecache_driver::set_group

erase()

Erase a cached value if the $group parameter is not specified the current group will be used

public erase(string $key[, string $group = '' ]) : mixed
Parameters
$key : string
$group : string = ''
Tags
see
cms_filecache_driver::set_group

exists()

Test if a cached value exists.

public exists(string $key[, string $group = '' ]) : bool

if the $group parameter is not specified the current group will be used

Parameters
$key : string
$group : string = ''
Tags
see
cms_filecache_driver::set_group
Return values
bool

get()

Get a cached value if the $group parameter is not specified the current group will be used

public get(string $key[, string $group = '' ]) : mixed
Parameters
$key : string
$group : string = ''
Tags
see
cms_filecache_driver::set_group

set()

Set a cached value if the $group parameter is not specified the current group will be used

public set(string $key, mixed $value[, string $group = '' ]) : mixed
Parameters
$key : string
$value : mixed
$group : string = ''
Tags
see
cms_filecache_driver::set_group

        
On this page

Search results