Class FTCache

(line 21)

Description


Located in File: /FTCache.php

The center of the caching system. This handles cacheable objects and stores them in the chosen container mechanism using the given algorithm.


Class Variables

Summary:

$_container = NULL (line 34)

Data type : FTCache_Container

Container where the cache entries are stored
  • access: - protected

$_strategy = NULL (line 27)

Data type : FTCache_Strategy

Algorithm we use to map object ids and cache indices
  • access: - protected

Class Constants

Summary:

Method Detail

Summary:
FTCache __construct (int $size, string|FTCache_Strategy $algorithm, string|FTCache_Container $container)
boolean get (int $id, FTCache_Cacheable $object)
boolean isCached (int $id)
boolean set (FTCache_Cacheable $object)

Constructor __construct (line 44)

FTCache __construct( int $size, string|FTCache_Strategy $algorithm, string|FTCache_Container $container)

Creates a new cache with the given options.

Parameters

  • int $size:
  • string|FTCache_Strategy $algorithm: Name or Instance of an FTCache_Strategy class to use
  • string|FTCache_Container $container: Name or Instance of an FTCache_Container class to use

Info

  • throws - Exception Throws an exception if we have invalid parameter
  • access - public

Method get (line 88)

boolean get( int $id, FTCache_Cacheable $object)

Retrieve the object with the given index from the cache.

Parameters

Info

  • return - True on success, false on error.
  • access - public

Method isCached (line 117)

boolean isCached( int $id)

Check if the given index is in the cache

Parameters

  • int $id: Object ID

Info

  • return - True on cached, false on not cached
  • access - public

Method set (line 143)

boolean set( FTCache_Cacheable $object)

Place the given object into the cache

Parameters

Info

  • return - True on success, false on error.
  • access - public

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary


Documentation generated on Sat, 01 Mar 2008 03:16:45 +0000 by phpDocumentor 1.4.0