Download the PHP package soupmix/cache without Composer
On this page you can find all versions of the php package soupmix/cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download soupmix/cache
More information about soupmix/cache
Files in soupmix/cache
Package cache
Short Description Provides framework agnostic implementation of PSR-16 Simple Cache Interface
License MIT
Homepage https://github.com/soupmix/cache
Informations about the package cache
Soupmix SimpleCache API
Soupmix Cache provides framework-agnostic implementation of PSR-16 Simple Cache Interface.
1. Install and Connect to Service
It's recommended that you use Composer to install Soupmix Cache Adaptors.
Installation
1.1 Redis
Connect to Redis (single instance) service
1.2 Memcached
Connect to Memcached service
1.3 APCu
Usage
1.4 PHP Array
Usage
2. Persist data in the cache, uniquely referenced by a key with an optional expiration TTL time.
@param string $key: The key of the item to store
@param mixed $value: The value of the item to store
@param null|integer|DateInterval $ttl: Optional. The TTL value of this item. If no value is sent and the driver supports TTL then the library may set a default value for it or let the driver take care of that. Predefined DataIntervals: TTL_MINUTE, TTL_HOUR, TTL_DAY.
@return bool True on success and false on failure
3. Determine whether an item is present in the cache.
@param string $key: The unique cache key of the item to delete
@return bool True on success and false on failure
4. Fetch a value from the cache.
@param string $key: The unique key of this item in the cache @return mixed The value of the item from the cache, or null in case of cache miss
5. Delete an item from the cache by its unique key
@param string $key: The unique cache key of the item to delete
@return bool True on success and false on failure
6. Persisting a set of key => value pairs in the cache, with an optional TTL.
@param array|Traversable $items: An array of key => value pairs for a multiple-set operation.
@param null|integer|DateInterval $ttl: Optional. The amount of seconds from the current time that the item will exist in the cache for. If this is null then the cache backend will fall back to its own default behaviour.
@return bool True on success and false on failure
7. Obtain multiple cache items by their unique keys.
@param array|Traversable $keys: A list of keys that can obtained in a single operation.
@return array An array of key => value pairs. Cache keys that do not exist or are stale will have a value of null.
8. Delete multiple cache items in a single operation.
@param array|Traversable $keys: The array of string-based keys to be deleted
@return bool True on success and false on failure
9. Wipe clean the entire cache's keys (Flush)
@return bool True on success and false on failure