Class CacheStorageMemcached

Description

Implements interfaces:

Object cache storage in memcached

Stores objects/data in a memcached server.

Be aware that you cannot pass parameters/do any configuation at this point. This will only work when memcache is installed on the local host and listening on the default port (11211).

Located in /phpsatk-lib/core/06.cache.memcached.php (line 40)


	
			
Method Summary
CacheStorageMemcached __construct ([string $server = 'localhost'], [int $port = 11211])
mixed getCachedObject (string $class, string $id, string $checksum)
boolean objectExists (string $class, string $id, string $checksum)
void putCacheObject (string $class, string $id, string $checksum, mixed $object)
void removeCacheObject (string $class, string $id, string $checksum)
Methods
Constructor __construct (line 58)

Initializes the cache storage

Tries to connect to the memcached server

  • access: public
CacheStorageMemcached __construct ([string $server = 'localhost'], [int $port = 11211])
  • string $server: IP/Host to connect to
  • int $port: Port to connect to
getCachedObject (line 97)

Fetches the cached object of a specified class/id

mixed getCachedObject (string $class, string $id, string $checksum)
  • string $class: Class name
  • string $id: Cache indentifier (e.g. storing multiple instances of a object)
  • string $checksum: Current checksum
objectExists (line 81)

Checks whether an object exists in cache

If not the object using this has to create the wanted object, fill it with data and save it to the cache. Otherwise it can fetch it from the cache.

boolean objectExists (string $class, string $id, string $checksum)
  • string $class: Class name
  • string $id: Cache indentifier (e.g. storing multiple instances of a object)
  • string $checksum: Current checksum
putCacheObject (line 125)

Stores an object in the cache

  • access: public
void putCacheObject (string $class, string $id, string $checksum, mixed $object)
  • string $class: Class name
  • string $id: Cache indentifier (e.g. storing multiple instances of a object)
  • string $checksum: Current checksum
  • mixed $object: Object to store
removeCacheObject (line 110)

Removes the specified object from cache

  • access: public
void removeCacheObject (string $class, string $id, string $checksum)
  • string $class: Class name
  • string $id: Cache indentifier (e.g. storing multiple instances of a object)
  • string $checksum: Current checksum

Documentation generated on Mon, 21 May 2007 10:34:34 +0200 by phpDocumentor 1.3.0RC5