Abstract Class Phalcon\Cache\AbstractCache
Código fuente en GitHub
Namespace |
Phalcon\Cache |
|
Uses |
DateInterval, Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Cache\Exception\InvalidArgumentException, Traversable |
|
Implements |
CacheInterface |
Este componente ofrece capacidades de caché para su aplicación.
Propiedades
/**
* The adapter
*
* @var AdapterInterface
*/
protected adapter;
Métodos
public function __construct( AdapterInterface $adapter );
Constructor.
public function getAdapter(): AdapterInterface;
Returns the current adapter
protected function checkKey( string $key ): void;
Comprueba la clave. Si contiene caracteres inválidos lanzará una excepción
protected function checkKeys( mixed $keys ): void;
Comprueba la clave. Si contiene caracteres inválidos lanzará una excepción
protected function doClear(): bool;
Limpia las claves de todo el caché.
protected function doDelete( string $key ): bool;
Elimina un elemento del caché por su clave única.
protected function doDeleteMultiple( mixed $keys ): bool;
Elimina múltiples elementos del caché en una única operación.
protected function doGet( string $key, mixed $defaultValue = null );
Obtiene un valor del caché.
protected function doGetMultiple( mixed $keys, mixed $defaultValue = null );
Obtiene múltiples elementos del caché usando sus claves únicas.
protected function doHas( string $key ): bool;
Determina si un elemento está presente en el caché.
protected function doSet( string $key, mixed $value, mixed $ttl = null ): bool;
Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
protected function doSetMultiple( mixed $values, mixed $ttl = null ): bool;
Persists a set of key => value pairs in the cache, with an optional TTL.
abstract protected function getExceptionClass(): string;
Returns the exception class that will be used for exceptions thrown
Interface Phalcon\Cache\Adapter\AdapterInterface
Código fuente en GitHub
Namespace |
Phalcon\Cache\Adapter |
|
Uses |
Phalcon\Storage\Adapter\AdapterInterface |
|
Extends |
StorageAdapterInterface |
Interfaz para adaptadores Phalcon\Cache
Class Phalcon\Cache\Adapter\Apcu
Código fuente en GitHub
Namespace |
Phalcon\Cache\Adapter |
|
Uses |
Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Storage\Adapter\Apcu |
|
Extends |
StorageApcu |
|
Implements |
CacheAdapterInterface |
Adaptador Apcu
Class Phalcon\Cache\Adapter\Libmemcached
Código fuente en GitHub
Namespace |
Phalcon\Cache\Adapter |
|
Uses |
Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Storage\Adapter\Libmemcached |
|
Extends |
StorageLibmemcached |
|
Implements |
CacheAdapterInterface |
Adaptador Libmemcached
Class Phalcon\Cache\Adapter\Memory
Código fuente en GitHub
Namespace |
Phalcon\Cache\Adapter |
|
Uses |
Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Storage\Adapter\Memory |
|
Extends |
StorageMemory |
|
Implements |
CacheAdapterInterface |
Adaptador de Memoria
Class Phalcon\Cache\Adapter\Redis
Código fuente en GitHub
Namespace |
Phalcon\Cache\Adapter |
|
Uses |
Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Storage\Adapter\Redis |
|
Extends |
StorageRedis |
|
Implements |
CacheAdapterInterface |
Adaptador Redis
Class Phalcon\Cache\Adapter\Stream
Código fuente en GitHub
Namespace |
Phalcon\Cache\Adapter |
|
Uses |
Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Storage\Adapter\Stream |
|
Extends |
StorageStream |
|
Implements |
CacheAdapterInterface |
Adaptador de Flujo
Class Phalcon\Cache\AdapterFactory
Código fuente en GitHub
Namespace |
Phalcon\Cache |
|
Uses |
Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Cache\Exception\Exception, Phalcon\Factory\AbstractFactory, Phalcon\Storage\SerializerFactory |
|
Extends |
AbstractFactory |
Fábrica para crear adaptadores de Cache
Propiedades
/**
* @var SerializerFactory
*/
private serializerFactory;
Métodos
public function __construct( SerializerFactory $factory, array $services = [] );
Constructor AdapterFactory.
public function newInstance( string $name, array $options = [] ): AdapterInterface;
Crea una nueva instancia del adaptador
protected function getExceptionClass(): string;
protected function getServices(): array;
Devuelve los adaptadores disponibles
Class Phalcon\Cache\Cache
Código fuente en GitHub
Namespace |
Phalcon\Cache |
|
Uses |
DateInterval, Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Cache\Exception\InvalidArgumentException |
|
Extends |
AbstractCache |
Este componente ofrece capacidades de caché para su aplicación.
Métodos
public function clear(): bool;
Limpia las claves de todo el caché.
public function delete( string $key ): bool;
Elimina un elemento del caché por su clave única.
public function deleteMultiple( mixed $keys ): bool;
Elimina múltiples elementos del caché en una única operación.
public function get( string $key, mixed $defaultValue = null );
Obtiene un valor del caché.
public function getMultiple( mixed $keys, mixed $defaultValue = null );
Obtiene múltiples elementos del caché usando sus claves únicas.
public function has( string $key ): bool;
Determina si un elemento está presente en el caché.
public function set( string $key, mixed $value, mixed $ttl = null ): bool;
Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
public function setMultiple( mixed $values, mixed $ttl = null ): bool;
Persists a set of key => value pairs in the cache, with an optional TTL.
protected function getExceptionClass(): string;
Returns the exception class that will be used for exceptions thrown
Class Phalcon\Cache\CacheFactory
Código fuente en GitHub
Namespace |
Phalcon\Cache |
|
Uses |
Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Cache\Cache, Phalcon\Cache\Exception\Exception, Phalcon\Config\ConfigInterface, Phalcon\Factory\AbstractConfigFactory |
|
Extends |
AbstractConfigFactory |
Crea una nueva clase Cache
Propiedades
/**
* @var AdapterFactory
*/
protected adapterFactory;
Métodos
public function __construct( AdapterFactory $factory );
Constructor
public function load( mixed $config ): CacheInterface;
Factoría para crear una instancia desde un objeto Config
public function newInstance( string $name, array $options = [] ): CacheInterface;
Construye una nueva instancia Cache.
protected function getExceptionClass(): string;
Interface Phalcon\Cache\CacheInterface
Código fuente en GitHub
Namespace |
Phalcon\Cache |
|
Uses |
DateInterval, Phalcon\Cache\Exception\InvalidArgumentException |
Interface for Phalcon\Cache\Cache
Métodos
public function clear(): bool;
Limpia las claves de todo el caché.
public function delete( string $key ): bool;
Elimina un elemento del caché por su clave única.
public function deleteMultiple( mixed $keys ): bool;
Elimina múltiples elementos del caché en una única operación.
public function get( string $key, mixed $defaultValue = null );
Obtiene un valor del caché.
public function getMultiple( mixed $keys, mixed $defaultValue = null );
Obtiene múltiples elementos del caché usando sus claves únicas.
public function has( string $key ): bool;
Determina si un elemento está presente en el caché.
public function set( string $key, mixed $value, mixed $ttl = null ): bool;
Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
public function setMultiple( mixed $values, mixed $ttl = null ): bool;
Persists a set of key => value pairs in the cache, with an optional TTL.
Class Phalcon\Cache\Exception\Exception
Código fuente en GitHub
Namespace |
Phalcon\Cache\Exception |
|
Extends |
\Exception |
Las excepciones lanzadas en Phalcon\Cache usarán esta clase
Class Phalcon\Cache\Exception\InvalidArgumentException
Código fuente en GitHub
Namespace |
Phalcon\Cache\Exception |
|
Extends |
\Exception |
Las excepciones lanzadas en Phalcon\Cache usarán esta clase