Apache Zeta Components Manual :: File Source for stackable_storage.php

Source for file stackable_storage.php

Documentation is available at stackable_storage.php

  1. <?php
  2. /**
  3.  * File containing the ezcCacheStackableStorage class.
  4.  *
  5.  * Licensed to the Apache Software Foundation (ASF) under one
  6.  * or more contributor license agreements.  See the NOTICE file
  7.  * distributed with this work for additional information
  8.  * regarding copyright ownership.  The ASF licenses this file
  9.  * to you under the Apache License, Version 2.0 (the
  10.  * "License"); you may not use this file except in compliance
  11.  * with the License.  You may obtain a copy of the License at
  12.  * 
  13.  *   http://www.apache.org/licenses/LICENSE-2.0
  14.  * 
  15.  * Unless required by applicable law or agreed to in writing,
  16.  * software distributed under the License is distributed on an
  17.  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18.  * KIND, either express or implied.  See the License for the
  19.  * specific language governing permissions and limitations
  20.  * under the License.
  21.  *
  22.  * @package Cache
  23.  * @version //autogentag//
  24.  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  25.  * @filesource
  26.  */
  27.  
  28. /**
  29.  * Interface for stackable storage classes.
  30.  * 
  31.  * This interface must be implemented by storages that can be combined into a
  32.  * {@link ezcCacheStack}.
  33.  *
  34.  * @package Cache
  35.  * @version //autogentag//
  36.  */
  37. {
  38.     /**
  39.      * Purge outdated data from the storage.
  40.      * 
  41.      * This method purges outdated data from the cache. If $limit is given, a
  42.      * maximum of $limit items is purged. Otherwise all outdated items are
  43.      * purged. The method returns an array containing the IDs of all cache
  44.      * items that have been purged.
  45.      *
  46.      * @param int $limit 
  47.      * @return array(string) 
  48.      */
  49.     public function purge$limit null );
  50.  
  51.  
  52.     /**
  53.      * Delete data from the cache.
  54.      *
  55.      * This method is already defined in {@link ezcCacheStorage::delete()}.
  56.      * However, the basic definition does not define a return value. If this
  57.      * interface is implemented, the method must return an array of item IDs
  58.      * that have been deleted from the storage.
  59.      *
  60.      * @param string $id 
  61.      * @param array(string=>string) 
  62.      * @param bool $search 
  63.      *
  64.      * @return array(string) 
  65.      */
  66.     // @TODO: Does not work since this method is already declared abstract in
  67.     // ezcCacheStorage. "Fatal error: Can't inherit abstract function..." in
  68.     // 5.2.6RC3-dev
  69.     // public function delete( $id = null, $attributes = array(), $search = false );
  70.  
  71.     /**
  72.      * Reset the complete storage.
  73.      *
  74.      * This method resets the complete cache storage. All content (including
  75.      * content stored with the {@link ezcCacheStackMetaDataStorage} interfacer) must
  76.      * be deleted and the cache storage must appear as if it has just newly
  77.      * been created.
  78.      * 
  79.      * @return void 
  80.      */
  81.     public function reset();
  82. }
  83.  
  84. ?>
Documentation generated by phpDocumentor 1.4.3