From 3bda89ff20f7be958e2823fe57bea9566558e3a4 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Mon, 3 Jan 2011 17:22:43 +0100 Subject: [PATCH] Start extracting the list cache. --- .../lib/Horde/Kolab/Storage/Cache/List.php | 46 ++++++++++++++++++++++ .../Horde/Kolab/Storage/List/Decorator/Cache.php | 8 ++++ framework/Kolab_Storage/package.xml | 6 ++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 framework/Kolab_Storage/lib/Horde/Kolab/Storage/Cache/List.php diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Cache/List.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Cache/List.php new file mode 100644 index 000000000..084d7b161 --- /dev/null +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Cache/List.php @@ -0,0 +1,46 @@ + + * @license http://www.fsf.org/copyleft/lgpl.html LGPL + * @link http://pear.horde.org/index.php?package=Kolab_Storage + */ + +/** + * A cache backend for Kolab storage list handlers. + * + * Copyright 2010 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. + * + * @category Kolab + * @package Kolab_Storage + * @author Gunnar Wrobel + * @license http://www.fsf.org/copyleft/lgpl.html LGPL + * @link http://pear.horde.org/index.php?package=Kolab_Storage + */ +class Horde_Kolab_Storage_Cache_List +{ + /** + * The core cache driver. + * + * @var Horde_Kolab_Storage_Cache + */ + protected $_cache; + + /** + * Constructor. + * + * @param Horde_Kolab_Storage_Cache $cache The core cache driver. + */ + public function __construct($cache) + { + $this->_cache = $cache; + } +} diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php index 481407dd4..14a3966e6 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php @@ -61,6 +61,13 @@ implements Horde_Kolab_Storage_List private $_cache; /** + * The list cache. + * + * @var Horde_Kolab_Storage_Cache_List + */ + private $_list_cache; + + /** * Has the cache already been loaded and validated? * * @var boolean @@ -80,6 +87,7 @@ implements Horde_Kolab_Storage_List ) { $this->_list = $list; $this->_cache = $cache; + $this->_list_cache = new Horde_Kolab_Storage_Cache_List($cache); } /** diff --git a/framework/Kolab_Storage/package.xml b/framework/Kolab_Storage/package.xml index 8d639ac97..79a145163 100644 --- a/framework/Kolab_Storage/package.xml +++ b/framework/Kolab_Storage/package.xml @@ -32,7 +32,7 @@ yes 2011-01-03 - + 0.4.0 0.1.0 @@ -73,6 +73,9 @@ + + + @@ -583,6 +586,7 @@ + -- 2.11.0