CacheSession provides method for saving sessions into a Cache engine. Used with Session
array<string, mixed>Options for this session engine
Constructor.
Method called on close of a database session.
Method called on the destruction of a cache session.
No-op method. Always returns 0 since cache engine don't have garbage collection.
Method called on open of a database session.
Method used to read from a cache session.
Helper function called on write for cache sessions.
__construct(array<string, mixed> $config = [])
Constructor.
array<string, mixed> $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
InvalidArgumentExceptionclose(): bool
Method called on close of a database session.
booldestroy(string $id): bool
Method called on the destruction of a cache session.
string $id ID that uniquely identifies session in cache.
boolgc(int $maxlifetime): int|false
No-op method. Always returns 0 since cache engine don't have garbage collection.
int $maxlifetime Sessions that have not updated for the last maxlifetime seconds will be removed.
int|falseopen(string $path, string $name): bool
Method called on open of a database session.
string $path The path where to store/retrieve the session.
string $name The session name.
boolread(string $id): string|false
Method used to read from a cache session.
string $id ID that uniquely identifies session in cache.
string|falsewrite(string $id, string $data): bool
Helper function called on write for cache sessions.
string $id ID that uniquely identifies session in cache.
string $data The data to be saved.
boolOptions for this session engine
array<string, mixed>
© 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.4/class-Cake.Http.Session.CacheSession.html