|
Size: | 9303 |
Storage flags: | no_autoload,compress/gzip (31%) |
Zend\Session\SaveHandler\Cache allows you to provide an instance of Zend\Cache to be utilized as a session save handler. Generally if you are utilizing the Cache save handler; you are likely using products such as memcached.
A basic example is one like the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | use Zend\Cache\StorageFactory;
use Zend\Session\SaveHandler\Cache;
use Zend\Session\SessionManager;
$cache = StorageFactory::factory(array(
'adapter' => array(
'name' => 'memcached',
'options' => array(
'server' => '127.0.0.1',
),
)
));
$saveHandler = new Cache($cache);
$manager = new SessionManager();
$manager->setSaveHandler($saveHandler);
|
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.