\TriTanCache

Summary

Methods
Properties
Constants
__construct()
set()
get()
setCache()
getCache()
readCache()
writeCache()
isCacheValid()
pageLoad()
clearCache()
purge()
addLog()
$cachename
$setTTL
No constants found
No protected methods found
$cachepath
$extension
$cachefile
$starttime
$log
N/A
No private methods found
No private properties found
N/A

Properties

$cachename

$cachename : string

The key name of the cache file

Type

string

$setTTL

$setTTL : integer

Time to live for cache file

Type

integer

$cachepath

$cachepath : string

The path to the cache file folder

Type

string

$extension

$extension : string

The cache file extension

Type

string

$cachefile

$cachefile : string

Full location of cache file

Type

string

$starttime

$starttime : float

Execution Time

Type

float

$log

$log : float

Logs errors that may occur

Type

float

Methods

__construct()

__construct(  $name = '') 

Parameters

$name

set()

set(  $key,   $data) : mixed

Sets objects that should be cached.

Parameters

$key
$data

Returns

mixed

get()

get(  $key) : mixed

Cached data by its Prefix

Parameters

$key

Returns

mixed

setCache()

setCache() : mixed

Begins the section where caching begins

Returns

mixed

getCache()

getCache() : mixed

Ends the section where caching stops and returns the cached file.

Returns

mixed

readCache()

readCache(  $filename) : mixed

Reads a cache file if it exists and prints it out to the screen.

Parameters

$filename

Returns

mixed

writeCache()

writeCache(  $data,   $filename) : mixed

Writes cache data to be read

Parameters

$data
$filename

Returns

mixed

isCacheValid()

isCacheValid(  $filename) : mixed

Checks if a cache file is valid

Parameters

$filename

Returns

mixed

pageLoad()

pageLoad() : mixed

Execution time of the cached page

Returns

mixed

clearCache()

clearCache(  $filename) : mixed

Clears the cache base on cache file name/key

Parameters

$filename

Returns

mixed

purge()

purge() : mixed

Clears all cache files

Returns

mixed

addLog()

addLog(  $value) : mixed

Prints a log if error occurs

Parameters

$value

Returns

mixed