SessionTtlExtension
extends CompilerExtension
in package
FinalYes
Swaps the Redis session handler registered by `Contributte\Redis` for {@see TieredTtlSessionHandler}. Does nothing when Redis sessions are off (`redis.sessions: false`), as there is no handler definition to swap then.
The handler also gets a file fallback directory (default %tempDir%/sessions), so an
unreachable Redis does not turn every request into a 500.
IMPORTANT: list it in extensions after redis. That extension adds its handler in
beforeCompile() and extensions run in registration order, so listed before it there is
nothing to swap and the stock handler stays.
Table of Contents
Methods
- beforeCompile() : void
- getConfigSchema() : Schema
- defaultFallbackDir() : string|null
- `%tempDir%/sessions`; null (no fallback) only when `tempDir` is missing.
Methods
beforeCompile()
public
beforeCompile() : void
getConfigSchema()
public
getConfigSchema() : Schema
Return values
SchemadefaultFallbackDir()
`%tempDir%/sessions`; null (no fallback) only when `tempDir` is missing.
private
defaultFallbackDir() : string|null