class Storage
Theme Storage.
A hybrid storage solution that utilizes the cache system for complex and expensive operations performed by a [base] theme.
Instead of using multiple cache identifiers, which increases the number of database calls, this storage only executes a single cache call and stores individual entries in memory as an associative array.
It also tracks when the data has been modified so it can be saved back to cache before the system fully shuts down.
This storage object can be used in foreach
loops.
Hierarchy
- class \Drupal\bootstrap\Utility\Storage extends \Drupal\Core\KeyValueStore\MemoryStorage implements \Iterator
Expanded class hierarchy of Storage
Related topics
Namespace
Drupal\bootstrap\UtilityMembers
Name | Modifiers | Type | Description |
---|---|---|---|
Storage:: |
protected | property | The bin (table) data should be stored in (not prefixed with "cache_"). |
Storage:: |
protected | property | Flag determining whether or not the cache should be saved to the database. |
Storage:: |
protected | property | The cache identifier. |
Storage:: |
protected | property | Indicates when the cache should expire. |
Storage:: |
protected | property | Flag determining whether or not object has been initialized yet. |
Storage:: |
protected | property | Tags to associate with the cached data so it can be properly invalidated. |
Storage:: |
public | function | Notifies the object that data has changed. |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function | Determines if the cache is empty. |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function | Saves the data back to the database, if necessary, on shutdown. |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function | |
Storage:: |
public | function |