PHP Класс Webiny\Component\Cache\Cache

The cache component is used to store different information into memory or file system for much faster access. The stored information can only be accessed for a limited time, after which it is invalidated. The Memory library is required by this class.
Наследование: use trait Webiny\Component\StdLib\ComponentTrait
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
APC ( array $options = [] ) : CacheStorage Create a cache instance with APC as cache driver.
BlackHole ( ) : CacheStorage Create a cache instance with BlackHole cache driver.
Couchbase ( string $user, string $password, string $bucket, string $host = '127.0.0.1:8091', array $options = [] ) : CacheStorage Create a cache instance with Couchbase as cache driver.
Memcache ( string $host = '127.0.0.1', integer $port = 11211, array $options = [] ) : CacheStorage Create a cache instance with Memcache as cache driver.
Redis ( string $host = '127.0.0.1', integer $port = 6379, array $options = [] ) : CacheStorage Create a cache instance with Redis as cache driver.
SessionArray ( ) : CacheStorage Create a cache instance with SessionArray cache driver.

Описание методов

APC() публичный статический Метод

Create a cache instance with APC as cache driver.
public static APC ( array $options = [] ) : CacheStorage
$options array Cache options.
Результат CacheStorage

BlackHole() публичный статический Метод

NOTE: BlackHole driver turns off the cache.
public static BlackHole ( ) : CacheStorage
Результат CacheStorage

Couchbase() публичный статический Метод

Create a cache instance with Couchbase as cache driver.
public static Couchbase ( string $user, string $password, string $bucket, string $host = '127.0.0.1:8091', array $options = [] ) : CacheStorage
$user string Couchbase username.
$password string Couchbase password.
$bucket string Couchbase bucket.
$host string Couchbase host (with port number).
$options array Cache options.
Результат CacheStorage

Memcache() публичный статический Метод

Create a cache instance with Memcache as cache driver.
public static Memcache ( string $host = '127.0.0.1', integer $port = 11211, array $options = [] ) : CacheStorage
$host string Host where the memcached is running.
$port integer Port where memcached is running.
$options array Cache options.
Результат CacheStorage

Redis() публичный статический Метод

Create a cache instance with Redis as cache driver.
public static Redis ( string $host = '127.0.0.1', integer $port = 6379, array $options = [] ) : CacheStorage
$host string Host where the Redis server is running.
$port integer Port where Redis server is running.
$options array Cache options.
Результат CacheStorage

SessionArray() публичный статический Метод

Create a cache instance with SessionArray cache driver.
public static SessionArray ( ) : CacheStorage
Результат CacheStorage