Start extracting the list cache.
authorGunnar Wrobel <p@rdus.de>
Mon, 3 Jan 2011 16:22:43 +0000 (17:22 +0100)
committerGunnar Wrobel <p@rdus.de>
Tue, 4 Jan 2011 07:54:24 +0000 (08:54 +0100)
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Cache/List.php [new file with mode: 0644]
framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php
framework/Kolab_Storage/package.xml

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 (file)
index 0000000..084d7b1
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/**
+ * A cache backend for Kolab storage list handlers.
+ *
+ * PHP version 5
+ *
+ * @category Kolab
+ * @package  Kolab_Storage
+ * @author   Gunnar Wrobel <wrobel@pardus.de>
+ * @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 <wrobel@pardus.de>
+ * @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;
+    }
+}
index 481407d..14a3966 100644 (file)
@@ -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);
     }
 
     /**
index 8d639ac..79a1451 100644 (file)
@@ -32,7 +32,7 @@
   <active>yes</active>
  </lead>
  <date>2011-01-03</date>
- <time>15:55:17</time>
+ <time>17:20:40</time>
  <version>
   <release>0.4.0</release>
   <api>0.1.0</api>
@@ -73,6 +73,9 @@
     <dir name="Horde">
      <dir name="Kolab">
       <dir name="Storage">
+       <dir name="Cache">
+        <file name="List.php" role="php" />
+       </dir> <!-- /lib/Horde/Kolab/Storage/Cache -->
        <dir name="Decorator">
         <file name="Cache.php" role="php" />
         <file name="Log.php" role="php" />
    <install as="Horde/Kolab/Storage/Queriable.php" name="lib/Horde/Kolab/Storage/Queriable.php" />
    <install as="Horde/Kolab/Storage/Query.php" name="lib/Horde/Kolab/Storage/Query.php" />
    <install as="Horde/Kolab/Storage/Translation.php" name="lib/Horde/Kolab/Storage/Translation.php" />
+   <install as="Horde/Kolab/Storage/Cache/List.php" name="lib/Horde/Kolab/Storage/Cache/List.php" />
    <install as="Horde/Kolab/Storage/Decorator/Cache.php" name="lib/Horde/Kolab/Storage/Decorator/Cache.php" />
    <install as="Horde/Kolab/Storage/Decorator/Log.php" name="lib/Horde/Kolab/Storage/Decorator/Log.php" />
    <install as="Horde/Kolab/Storage/Driver/Base.php" name="lib/Horde/Kolab/Storage/Driver/Base.php" />