Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitMemoryCache

Core::arbitMemoryCache

Class arbitMemoryCache

Arbit simple file based cache handler Provides simple cache handling with support for TTL of cache items.

Arbit simple file based cache handler Provides simple cache handling with support for TTL of cache items. Currently everything is just stored in the filesystem. Since we store PHP files an opcode cache will keep the most recent items in the memory. We may want to put some cache items into memcache or similar shared memory caches at some point in the future. We may want to use the cache component from the eZ Components at this point, which will pprovide such a mutilevel caching since its 2008.1 release.

arbitCache
   |
   --arbitMemoryCache
Author(s):
Version:   $Revision: 1236 $
License:   GPL

Inherited Constants

From arbitCache:
arbitCache::INFINITE    Infinite TTL, causes that the cache will never timeout itself.

Member Variables

protected array $storage
Cache storage

Cache storage

Inherited Member Variables

From arbitCache
protected arbitCache::$caches

Method Summary

public void __construct( [ $path = null] )
Construct cache from cache root
public void cache( $cache , $id , $item )
Cache item Cache item specified with a (hopefully unique) identifier in specified cache.
public void clearCache( $cache )
Clear cache Clear the cache specified by the cache ID completely. be purged.
public mixed get( $cache , $id )
Get cache item from cache by its ID
public void purge( $cache , $id )
Remove item from cache Remove the item specified by its ID from the specified cache.

Inherited Methods

From arbitCache
public void arbitCache::addCache()
Add a new cache Add a new cache specified by its name. and you may optionally specify a TTL for cache items. to 3600 seconds (which is one hour).
public abstract void arbitCache::cache()
Cache item Cache item specified with a (hopefully unique) identifier in specified cache.
public abstract void arbitCache::clearCache()
Clear cache Clear the cache specified by the cache ID completely. be purged.
public abstract mixed arbitCache::get()
Get cache item from cache by its ID
public array arbitCache::getCacheList()
Get cache list
public abstract void arbitCache::purge()
Remove item from cache Remove the item specified by its ID from the specified cache.

Methods

__construct

void __construct( [string $path = null] )

Construct cache from cache root

Construct cache from cache root If no explicit cache root is provided, the default location provided in the arbit constant ARBIT_CACHE_PATH is used.;

Parameters:
Name Type Description
$path string

cache

void cache( string $cache , string $id , mixed $item )

Cache item Cache item specified with a (hopefully unique) identifier in specified cache.

Cache item Cache item specified with a (hopefully unique) identifier in specified cache. Cacheable are all PHP scalar values, arrays and all object implementing arbitCacheable, which especially means, that all arbitBaseStruct extending objects are cacheable.

Parameters:
Name Type Description
$cache string
$id string
$item mixed
Redefinition of:
Method Description
arbitCache::cache() Cache item Cache item specified with a (hopefully unique) identifier in specified cache.

clearCache

void clearCache( string $cache )

Clear cache Clear the cache specified by the cache ID completely. be purged.

Clear cache Clear the cache specified by the cache ID completely. All contents will be purged.

Parameters:
Name Type Description
$cache string
Redefinition of:
Method Description
arbitCache::clearCache() Clear cache Clear the cache specified by the cache ID completely. be purged.

get

mixed get( string $cache , string $id )

Get cache item from cache by its ID

Get cache item from cache by its ID

Parameters:
Name Type Description
$cache string
$id string
Redefinition of:
Method Description
arbitCache::get() Get cache item from cache by its ID

purge

void purge( string $cache , string $id )

Remove item from cache Remove the item specified by its ID from the specified cache.

Remove item from cache Remove the item specified by its ID from the specified cache.

Parameters:
Name Type Description
$cache string
$id string
Redefinition of:
Method Description
arbitCache::purge() Remove item from cache Remove the item specified by its ID from the specified cache.
Documentation generated on Mon, 05 Apr 2010 14:02:04 +0200 by phpDocumentor 1.4.3