[READ-ONLY] An implementation of \SessionHandlerInterface that allows PSR-6
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


PSR-6 Session handler

Gitter Latest Stable Version codecov.io Total Downloads Monthly Downloads Software License

This is a PHP session handler that supports PSR-6 cache. It is a part of the PHP Cache organisation. Find more documentation at www.php-cache.com.


composer require cache/session-handler


$pool = new ArrayCachePool();
$config = ['ttl'=>3600, 'prefix'=>'foobar'];

$sessionHandler = new Psr6SessionHandler($pool, $config);

Note that this session handler does no kind of locking, so it will lose or overwrite your session data if you run scripts concurrently. You have been warned.


Contributions are very welcome! Send a pull request to the main repository or report any issues you find on the issue tracker.