com.lokorin.lokorin.lib
[ class tree: com.lokorin.lokorin.lib ] [ index: com.lokorin.lokorin.lib ] [ all elements ]

Procedural File: lib_cache.php

Source Location: /_includes/lib_cache.php



Page Details:

A library that contains functions and classes related to caching contents in files. Contents should be cached this way if it is rarely updated, only wanted in one specific form and often read.



Tags:

filesource:  Source Code for this file
license:  GNU Lesser General Public License
version:  $Revision: 1.1 $
author:  Andreas Launila








cacheExists [line 25]

boolean cacheExists( string $uniqueId)

Checks if there is a cache related to the specified unique identifier.



Tags:

return:  True if a cached file exists for the identifier, false otherwise.
access:  public


Parameters

string   $uniqueId   The unique identifier that will be checked for connections to existing cached files.
[ Top ]



deleteAllCachedContents [line 85]

void deleteAllCachedContents( )

Deletes all contents that is currently cached.



[ Top ]



deleteCache [line 68]

boolean deleteCache( string $uniqueId)

Deletes the cache with the specified unique identifier.



Tags:

return:  True if the cache was successfully deleted, false otherwise.
access:  public


Parameters

string   $uniqueId   The unique identifier that identifies the cache that should be deleted.
[ Top ]



getCache [line 39]

string getCache( string $uniqueId)

Gets the cache associated with the specified unique identifier.



Tags:

return:  The specified cache contents.
access:  public
throws:  IllegalArgumentException If there is no cache associated with the specified identifier.


Parameters

string   $uniqueId   The unique identifier that identifies the cache that should be retrieved. This is the unique identifier that was given when writing the cache.
[ Top ]



getCacheFile [line 78]

void getCacheFile( string $identifier)

Gets the absolute path of the file connected to the specified identifier.



Tags:

access:  private


Parameters

string   $identifier   The identifier for which the file name should be retrieved.
[ Top ]



writeCache [line 57]

void writeCache( string $uniqueId, string $contents)

Writes a specified cache contents and associates it with the specified unique identifier. This function will overwrite any existing cache with the same identifier.



Tags:

access:  public


Parameters

string   $uniqueId   The unique identifier that should identify the cache.
string   $contents   The contents that should be cached.
[ Top ]



Documentation generated on Sun, 16 Apr 2006 21:03:10 +0200 by phpDocumentor 1.3.0RC4