Class Kolab_Cache

Description

The Kolab_Cache class provides a cache for the Kolab storage for groupware objects

$Horde: framework/Kolab_Storage/lib/Horde/Kolab/Storage/Cache.php,v 1.2.2.4 2009/01/06 15:23:18 jan Exp $

Copyright 2007-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Kolab_Storage/lib/Horde/Kolab/Storage/Cache.php (line 26)


	
			
Variable Summary
Method Summary
 Kolab_Cache Kolab_Cache ()
 void expire ()
 void ignore (int $id)
 void load (string $key, int $data_version, [bool $force = false])
 mixed loadAttachment (string $key)
 void reset ()
 boolean save ()
 void store (int $id, string $object_id,  &$object, array $object)
 boolean storeAttachment (string $key, string $data)
Variables
int $nextid (line 71)

A nextid marker for a share in the cache. This allows the storage handler to invalidate the cache for this share.

array $objects (line 83)

The objects of the current share.

| objects: key is uid (GUID) | ----------- hashed object data |----------- uid: object id (GUID) | |----------- all fields from kolab specification

array $uids (line 94)

The uid<->object mapping of the current share.

| uids Mapping between imap uid and object uids: imap uid -> object uid Special: A value of "false" means we've seen the uid but we deciced to ignore it in the future

int $validity (line 63)

A validity marker for a share in the cache. This allows the storage handler to invalidate the cache for this share.

int $_base_version = 1 (line 41)

The internal version of the cache format represented by the code.

int $_cache_version = -1 (line 55)

The version of the cache format that includes the data version.

int $_data_version (line 48)

The version of the data format provided by the storage handler.

Horde_Cache $_horde_cache (line 108)

The link to the horde cache.

string $_key (line 101)

The unique key for the currently loaded data.

int $_version (line 33)

The version of the cache we loaded.

Methods
Constructor Kolab_Cache (line 113)

Constructor.

Kolab_Cache Kolab_Cache ()
expire (line 273)

Deliberately expire a cache.

void expire ()
ignore (line 265)

Mark the ID as invalid (cannot be correctly parsed).

void ignore (int $id)
  • int $id: The ID of the storage item to ignore.
load (line 155)

Load the cached share data identified by $key.

void load (string $key, int $data_version, [bool $force = false])
  • string $key: Access key to the cached data.
  • int $data_version: A version identifier provided by the storage manager.
  • bool $force: Force loading the cache.
loadAttachment (line 196)

Load a cached attachment.

  • return: The data of the object.
mixed loadAttachment (string $key)
  • string $key: Access key to the cached data.
reset (line 217)

Initialize the cache structure.

void reset ()
save (line 231)

Save the share data in the cache.

  • return: True on success.
boolean save ()
singleton (line 136)

Attempts to return a reference to a concrete Kolab_Cache instance. It will only create a new instance if no Kolab_Cache instance currently exists.

This method must be invoked as: $var = &Kolab_Cache::singleton()

  • return: The concrete Kolab_Cache reference, or false on error.
Kolab_Cache &singleton ()
store (line 254)

Store an object in the cache.

void store (int $id, string $object_id,  &$object, array $object)
  • int $id: The storage ID.
  • string $object_id: The object ID.
  • array $object: The object data.
  • &$object
storeAttachment (line 209)

Cache an attachment.

  • return: True if successfull.
boolean storeAttachment (string $key, string $data)
  • string $key: Access key to the cached data.
  • string $data: The data to be cached.

Documentation generated on Sun, 30 Jan 2011 05:15:39 +0000 by phpDocumentor 1.4.3