This object manages cache files

package OWR

 Methods

Not used with memcache, always returns true

checkDir(string $dir) : mixed
Static
author Pierre-Alain Mignot
static
access public

Parameters

$dir

string

the directory's name

Returns

mixed

Delete every files found in cache directory

clear(string $dir, boolean $maintenance) : int
Static
author Pierre-Alain Mignot
access public
static

Parameters

$dir

string

a directory in cache/

$maintenance

boolean

must-we just check for the lastmtime ?

Returns

intnumber of deleted files

Delete every files found in DB cache directory

clearDB() 
Static
author Pierre-Alain Mignot
access public
static

Delete every files found in HTML cache directories

clearHTML() 
Static
author Pierre-Alain Mignot
access public
static

Try to get serialized datas from cache This function uses file locking

get(string $filename, int $cacheTime) : mixed
Static
author Pierre-Alain Mignot
static
access public

Parameters

$filename

string

cache file name

$cacheTime

int

cache life time

Returns

mixed

Returns a unique filename

getRandomFilename(boolean $tmp) : string
Static
author Pierre-Alain Mignot
access public

Parameters

$tmp

boolean

if we must use default tmp dir, default to false

Returns

stringthe file name

Try to write serialized datas into cache This function uses file locking

write(string $filename, string $datas) : mixed
Static
author Pierre-Alain Mignot
static
access public

Parameters

$filename

string

cache file name

$datas

string

datas to store in cache

Returns

mixed

Init connection to memcache server(s)

_init() 
Static
author Pierre-Alain Mignot
access protected
static

Constructor

__construct() 
access private

 Properties

 

\Memcache instance

$__instance : object
access private