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

Class: ForwardFW_Cache_Frontend

Source Location: /Cache/Frontend.php

Class Overview


Interface for a Cache.


Author(s):

Implements interfaces:

Methods


Child classes:

ForwardFW_Cache_Frontend_Function
Implementation of a Cache.

Class Details

[line 53]
Interface for a Cache.



Tags:

author:  Alexander Opitz <opitz.alexander@primacom.net>
link:  http://forwardfw.sourceforge.net
abstract:  
license:  GNU General Public License


[ Top ]


Class Methods


static method getBackend [line 101]

static ForwardFW_Interface_Cache_Backend getBackend( ForwardFW_Interface_Application $application, string $strCacheBackend, ForwardFW_Config_Cache_Backend $config)

Builds Backend of a cache configuration



Tags:

return:  Caching Backend.
access:  public


Parameters:

ForwardFW_Interface_Application   $application   The running application
string   $strCacheBackend   Configuration of caching
ForwardFW_Config_Cache_Backend   $config   Configuration of caching

[ Top ]

static method getFrontend [line 125]

static ForwardFW_Interface_Cache_Frontend getFrontend( ForwardFW_Interface_Application $application, ForwardFW_Config_Cache_Frontend $config, ForwardFW_Interface_Cache_Backend $backend)

Builds Backend of a cache configuration



Tags:

return:  Caching Frontend.
access:  public


Parameters:

ForwardFW_Interface_Application   $application   The running application
ForwardFW_Config_Cache_Frontend   $config   Configuration of caching
ForwardFW_Interface_Cache_Backend   $backend   Backend for the frontend

[ Top ]

static method getInstance [line 79]

static ForwardFW_Interface_Cache_Frontend getInstance( ForwardFW_Interface_Application $application, ForwardFW_Config_Cache_Frontend $config)

Builds an instance of cache



Tags:

return:  The cache Frontend
access:  public



Implementation of:
ForwardFW_Interface_Cache_Frontend::getInstance()
Builds an instance of cache

Parameters:

ForwardFW_Interface_Application   $application   The running application
ForwardFW_Config_Cache_Frontend   $config   Configuration of caching

[ Top ]

constructor __construct [line 63]

void __construct( ForwardFW_Interface_Application $application, ForwardFW_Interface_Cache_Backend $backend)

Constructor



Tags:

access:  public



Implementation of:
ForwardFW_Interface_Cache_Frontend::__construct()
Constructor

Parameters:

ForwardFW_Interface_Application   $application   The running application
ForwardFW_Interface_Cache_Backend   $backend   Backend instance.

[ Top ]

method calculateHash [line 205]

void calculateHash( ForwardFW_Config_Cache_Data $config)



Tags:

abstract:  
access:  protected


Overridden in child classes as:

ForwardFW_Cache_Frontend_Function::calculateHash()
Returns hash for this config.

Parameters:

ForwardFW_Config_Cache_Data   $config  

[ Top ]

method getCache [line 148]

mixed getCache( ForwardFW_Config_Cache_Data $config)

Returns content from cache or gathers the data



Tags:

return:  The data you requested.
access:  public


Overridden in child classes as:

ForwardFW_Cache_Frontend_Function::getCache()
Returns content from cache or gathers the data


Implementation of:
ForwardFW_Interface_Cache_Frontend::getCache()
Returns content from cache or gathers the data

Parameters:

ForwardFW_Config_Cache_Data   $config   What data should be get from cache

[ Top ]

method getDataToCache [line 207]

void getDataToCache( ForwardFW_Config_Cache_Data $config)



Tags:

abstract:  
access:  protected


Overridden in child classes as:

ForwardFW_Cache_Frontend_Function::getDataToCache()

Parameters:

ForwardFW_Config_Cache_Data   $config  

[ Top ]

method getHash [line 216]

string getHash( mixed $mValue)

Calculates a hash by serialize and md5.



Tags:

return:  The hash.
access:  public


Parameters:

mixed   $mValue   The data from which the hash should be gathered.

[ Top ]

method getRealData [line 188]

mixed getRealData( String $strHash, ForwardFW_Config_Cache_Data $config, boolean $bOldAvailable)

Returns the real data and add it to cache. If real data fails tries to get old data from cache if available.



Tags:

return:  The data you requested.
access:  protected


Parameters:

String   $strHash   Hash of cache
ForwardFW_Config_Cache_Data   $config   What data should be get from cache.
boolean   $bOldAvailable   True if backend has old data for hash.

[ Top ]


Documentation generated on Sun, 30 Jan 2011 20:46:42 +0100 by phpDocumentor 1.4.3