Documentation

CFileCache
in package

Class CCache

Table of Contents

MAIN_CACHE_PATH  = CACHE_PATH
$area_name  : mixed
$CACHE_PATH  : string
__construct()  : mixed
CFileCache constructor
clear()  : mixed
clear Method
clearArea()  : void
clearArea
delete()  : void
Delete a certain key if it exists
exists()  : bool
exists method
get()  : mixed
get
getCacheNames()  : an
getCacheNames Method
getCachePath()  : string
getCachePath
getName()  : string
getName method
set()  : void
Sets the value of an item to be stored
setArea()  : void
setArea
writeDebug()  : void
writeDebug
_createPathIfNotExists()  : mixed
Create all folder's Path on file system if not exist

Constants

Properties

Methods

__construct()

CFileCache constructor

public __construct(string $domain, mixed $db_name) : mixed
Parameters
$domain : string

application domain (unique name for each app)

$db_name : mixed
Return values
mixed

clear()

clear Method

public clear([ $needle = '*' ]) : mixed

Reset all cache

Parameters
$needle : = '*'

Removes all keys containing the key name, if $needle is empty string than remove all

Return values
mixed

clearArea()

clearArea

public clearArea(string $area_name) : void

remove all items of an area

Parameters
$area_name : string

name of area

Return values
void

delete()

Delete a certain key if it exists

public delete(string $name) : void
Parameters
$name : string

name of the key to be deleted

Return values
void

exists()

exists method

public exists(string $name) : bool

Check if a key exists and is in the cache

Parameters
$name : string

message to write on file log

Return values
bool

true if the key $name exists

get()

get

public get(string $name) : mixed

Writes a message to a cache-specific log file

Parameters
$name : string
Return values
mixed

The cached item: it can be a scalar value, an object or an array

getCacheNames()

getCacheNames Method

public getCacheNames() : an

Provides the list of cached file names

Return values
an

array with a list of cached file name or false if there are none

getCachePath()

getCachePath

public getCachePath() : string

Returns the path where it writes the cache files

Return values
string

the cache path of the application

getName()

getName method

public getName(string $name) : string

Given the name of a key determines the actual internal key to be used

Parameters
$name : string

message to write on file log

Return values
string

the internal key

set()

Sets the value of an item to be stored

public set(string $name, mixed $value) : void
Parameters
$name : string

key of the item to be stored

$value : mixed

value to be stored

Return values
void

setArea()

setArea

public setArea(string $area_name) : void

Set the name of current area

Parameters
$area_name : string

name of area

Return values
void

writeDebug()

writeDebug

public writeDebug(string $s) : void

Writes a message to a cache-specific log file

Parameters
$s : string

message to write on file log

Return values
void

_createPathIfNotExists()

Create all folder's Path on file system if not exist

private _createPathIfNotExists(string $path) : mixed
Parameters
$path : string

path to create

Return values
mixed

Search results