Feature: #70316 - Introduce Session Storage Framework
See forge#70316
Description
A new session storage framework has been introduced. The goal of this framework is to create interoperability between different session storages (called "backends") like database, file storage, Redis, etc.
Impact
An integrator may configure session backends based on
TYPO3_, which is either BE or FE.
The following session backends are available by default:
\TYPO3\CMS\ Core\ Session\ Backend\ Database Session Backend \TYPO3\CMS\ Core\ Session\ Backend\ Redis Session Backend
The default session backend for BE and FE is
Database with table set to fe_ and be_ respectively.
The configuration of the backend for each
TYPO3_ is stored within SYS/:
'SYS' => [
'session' => [
'BE' => [
'backend' => \TYPO3\CMS\Core\Session\Backend\RedisSessionBackend::class,
'options' => [
'hostname' => 'localhost',
'database' => 2
]
],
],
],
The
Database requires a table as option. If the backend is used to holds non-authenticated
sessions (default for FE), the has_ option must be set to true.
The
Redis requires a running PHP redis module (PHP extension "redis") and a running redis service.
By default, a connection will be made to hostname 127.0.0.1 and port 6379. You may also specify a database
number which to store the sessions in (default database is 0) and a password for the connection.
A developer may implement a custom session backend. To achieve this, the interface
\TYPO3\ has to be implemented.