## Apache Zeta Components Manual :: Docs For Class ezcCacheStackOptions

### Cache::ezcCacheStackOptions

### Class ezcCacheStackOptions

Options class for ezcCacheStack instances.

This options class is used with ezcCacheStack instances.

The $configurator property is special, since it only takes effect during construction of the stack. The idea is, to use this in combination with ezcCacheManager. The method ezcCacheStackConfigurator::configure() will called by the constructor of ezcCacheStack. Inside this method, the configuration of the stack can happen as needed. Therefore, the ezcCacheStackableStorage instances for the stack do not need to exist when the stack is configured in the ezcCacheManager.

The rest of the options is used as usual to affect the behavior of the ezcCacheStack. However, it is highly recommended to not change $metaStorage and $replacementStrategy once they have been set for a stack. If these options are changed, the whole stack needs to be resetted using ezcCacheStack::reset(). Aside of that, the previous $metaStorage needs to be resetted.

Source for this file: /Cache/src/options/stack.php

    ezcBaseOptions
       |
       --ezcCacheStackOptions

Version: | //autogen//

### Properties

bool

read/write

`$bubbleUpOnRestore`
This option determines if data that is restored from a storage in the stack will be bubbled up to higher caches. The default here is false, since it might significantly reduce the ezcCacheStack::restore() performance. In addition, for bubbled up items, only the attributes will be used that have been provided while restoring the desired item. Also the lifetime of the item will practically be reset, since higher storages will start with a fresh TTL value.

string | read/write | `$configurator` Name of a class implementing ezcCacheStackConfigurator. This class will be used right after construction of the stack, to perform initial configuration. After the construction process, this option does not have any effect. Null (default) means no configuration.
ezcCacheStackMetaDataStorage | read/write | `$metaStorage` This storage will be used to store the meta data of the replacement strategy used by the stack. If null (default) is given, the top most storage will be used.
string | read/write | `$replacementStrategy` The name of the class given in this property must extend ezcCacheReplacementStrategy. The class will be used as the replacement strategy in the stack. ezcCacheLruReplacementStrategy is the default.

### Inherited Member Variables

From ezcBaseOptions
protected | `ezcBaseOptions::$properties`

### Method Summary

public ezcCacheStackOptions | `__construct( [ $options = array()] )` Construct a new options object.

### Inherited Methods

From ezcBaseOptions
public ezcBaseOptions | `ezcBaseOptions::__construct()` Construct a new options object.
public void | `ezcBaseOptions::merge()` Merge an array into the actual options object.
public bool | `ezcBaseOptions::offsetExists()` Returns if an option exists.
public mixed | `ezcBaseOptions::offsetGet()` Returns an option value.
public void | `ezcBaseOptions::offsetSet()` Set an option.
public void | `ezcBaseOptions::offsetUnset()` Unset an option.

### Methods

#### __construct

ezcCacheStackOptions __construct( [ $options = array()] )

Construct a new options object.

Options are constructed from an option array by default. The constructor automatically passes the given options to the __set() method to set them in the class.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$options` | array(string=>mixed) | The initial options to set.

##### Exceptions:

Type | Description
--- | ---
`ezcBaseValueException` | If the value for a property is out of range.
`ezcBasePropertyNotFoundException` | If trying to access a non existent property.

##### Redefinition of:

Method | Description
--- | ---
`ezcBaseOptions::__construct()` | Construct a new options object.

Documentation generated by phpDocumentor 1.4.3