kernel
[ class tree: kernel ] [ index: kernel ] [ all elements ]

Class: BitCache

Source Location: /kernel/BitCache.php

Class Overview


A basic library to handle caching of various data


Variables

Methods



Class Details

[line 12]
A basic library to handle caching of various data



[ Top ]


Class Variables

$mFolder =

[line 17]

Used to store the directory used to store the cache files.



Tags:

private:  

Type:   mixed


[ Top ]



Class Methods


constructor BitCache [line 26]

void BitCache( [string $pSubdir = 'cache'], [boolean $pUseStorage = FALSE])

Will check the temp cache folder for existence and create it if necessary.



Tags:

access:  public


Parameters:

string   $pSubdir   use a specifed subdirectory
boolean   $pUseStorage   use the storage directory instead of the temp dir. only makes sense if you need direct webaccess to stored cachefiles

[ Top ]

method expungeCache [line 126]

TRUE expungeCache( )

remove the entire cache in the cache folder



Tags:

return:  on success, FALSE on failure
access:  public


[ Top ]

method expungeCacheFile [line 114]

void expungeCacheFile( pKey $pFile)

Used to remove a cached object.



Parameters:

pKey   $pFile   the unique identifier used to retrieve the cached item

[ Top ]

method getCacheFile [line 50]

filepath getCacheFile( string $pFile)

getCacheFile



Tags:

return:  on success, FALSE on failure
access:  public


Parameters:

string   $pFile  

[ Top ]

method getCacheUrl [line 65]

fileurl getCacheUrl( string $pFile)

getCacheUrl will get the URL to the cache file - only works when you're using BitCache with the UseStorage option



Tags:

return:  on success, FALSE on failure
access:  public


Parameters:

string   $pFile  

[ Top ]

method isCached [line 79]

true isCached( string $pFile, [numeric $pModTime = FALSE])

Used to check if an object is cached.



Tags:

return:  if cached object exists
access:  public


Parameters:

string   $pFile   name of the file we want to check for
numeric   $pModTime   Pass in the modification time you wish to check against

[ Top ]

method readCacheFile [line 97]

object if readCacheFile( pKey $pFile)

Used to retrieve an object if cached.



Tags:

return:  cached object exists


Parameters:

pKey   $pFile   the unique identifier used to retrieve the cached item

[ Top ]

method writeCacheFile [line 146]

void writeCacheFile( string $pFile, string $pData)

writeCacheFile



Tags:

access:  public


Parameters:

string   $pFile   file to write to
string   $pData   string to write to file

[ Top ]


Documentation generated on Wed, 29 Jul 2015 13:55:46 +0000 by phpDocumentor 1.5.0-lsces