Download the PHP package yiisoft/cache-memcached without Composer
On this page you can find all versions of the php package yiisoft/cache-memcached. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cache-memcached
Yii Cache Library - Memcached Handler
This package provides the Memcached handler and implements PSR-16 cache.
This option can be considered as the fastest one when dealing with a cache in a distributed applications (e.g. with several servers, load balancers, etc.).
Requirements
- PHP 8.0 or higher.
Memcached
PHP extension.
Installation
The package could be installed with Composer:
Configuration
Creating an instance:
$persistentId (string)
- The ID that identifies the Memcached instance is an empty string by default.
By default, the Memcached instances are destroyed at the end of the request.
To create an instance that persists between requests, use persistent_id to specify a unique ID for the instance.
All instances created with the same $persistentId
will share the same connection.
For more information, see the description of the
\Memcached::__construct()
.
$servers (array)
- List of memcached servers that will be added to the server pool.
List has the following structure:
The default value:
For more information, see the description of the
\Memcached::addServers()
.
General usage
The package does not contain any additional functionality for interacting with the cache, except those defined in the PSR-16 interface.
In order to delete value you can use:
To work with values in a more efficient manner, batch operations should be used:
getMultiple()
setMultiple()
deleteMultiple()
This package can be used as a cache handler for the Yii Caching Library.
Documentation
- Internals
If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.
License
The Yii Cache Library - Memcached Handler is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.