BitCache Class Reference

List of all members.

Public Member Functions

 BitCache ($pSubdir= 'cache', $pUseStorage=FALSE)
 expungeCache ()
 expungeCacheFile ($pFile)
 getCacheFile ($pFile)
 getCacheUrl ($pFile)
 isCached ($pFile, $pModTime=FALSE)
 readCacheFile ($pFile)
 writeCacheFile ($pFile, $pData)

Private Attributes

 $mFolder

Detailed Description

Definition at line 12 of file BitCache.php.


Member Function Documentation

BitCache::BitCache ( pSubdir = 'cache',
pUseStorage = FALSE 
)

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

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 public
Returns:
void

Definition at line 26 of file BitCache.php.

BitCache::expungeCache (  ) 

remove the entire cache in the cache folder

public

Returns:
TRUE on success, FALSE on failure

Definition at line 126 of file BitCache.php.

References $ret, and unlink_r().

Here is the call graph for this function:

BitCache::expungeCacheFile ( pFile  ) 

Used to remove a cached object.

Parameters:
pKey the unique identifier used to retrieve the cached item

Definition at line 114 of file BitCache.php.

References getCacheFile(), and isCached().

Here is the call graph for this function:

BitCache::getCacheFile ( pFile  ) 

getCacheFile

Parameters:
string $pFile public
Returns:
filepath on success, FALSE on failure

Definition at line 50 of file BitCache.php.

References FALSE.

Referenced by expungeCacheFile(), isCached(), readCacheFile(), and writeCacheFile().

BitCache::getCacheUrl ( pFile  ) 

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

Parameters:
string $pFile public
Returns:
fileurl on success, FALSE on failure

Definition at line 65 of file BitCache.php.

BitCache::isCached ( pFile,
pModTime = FALSE 
)

Used to check if an object is cached.

Parameters:
string $pFile name of the file we want to check for
numeric $pModTime Pass in the modification time you wish to check against public
Returns:
true if cached object exists

Definition at line 79 of file BitCache.php.

References FALSE, and getCacheFile().

Referenced by expungeCacheFile(), and readCacheFile().

Here is the call graph for this function:

BitCache::readCacheFile ( pFile  ) 

Used to retrieve an object if cached.

Parameters:
pKey the unique identifier used to retrieve the cached item
Returns:
object if cached object exists

Definition at line 97 of file BitCache.php.

References $cacheFile, $h, $ret, getCacheFile(), and isCached().

Here is the call graph for this function:

BitCache::writeCacheFile ( pFile,
pData 
)

writeCacheFile

Parameters:
string $pFile file to write to
string $pData string to write to file public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 142 of file BitCache.php.

References $h, and getCacheFile().

Here is the call graph for this function:


Member Data Documentation

BitCache::$mFolder [private]

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

Definition at line 17 of file BitCache.php.


The documentation for this class was generated from the following file:
Generated on Wed Aug 22 19:34:11 2007 for bitweaver by  doxygen 1.5.2