CacheSession provides method for saving sessions into a Cache engine. Used with Session
array
Options for this session engine
__construct(array $config)
Constructor.
array
$config optional The configuration to use for this engine It requires the key 'config' which is the name of the Cache config to use for storing the session
InvalidArgumentException
close()
Method called on close of a database session.
bool
Success
destroy(mixed $id)
Method called on the destruction of a cache session.
string
$id ID that uniquely identifies session in cache.
bool
Always true.
gc(mixed $maxlifetime)
No-op method. Always returns true since cache engine don't have garbage collection.
int
$maxlifetime Sessions that have not updated for the last maxlifetime seconds will be removed.
bool
Always true.
open(mixed $savePath, mixed $name)
Method called on open of a database session.
string
$savePath The path where to store/retrieve the session.
string
$name The session name.
bool
Success
read(mixed $id)
Method used to read from a cache session.
string
$id ID that uniquely identifies session in cache.
string
Session data or empty string if it does not exist.
write(mixed $id, mixed $data)
Helper function called on write for cache sessions.
string
$id ID that uniquely identifies session in cache.
string
$data The data to be saved.
bool
True for successful write, false otherwise.
Options for this session engine
array
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/class-Cake.Http.Session.CacheSession.html