[BUGFIX] Do not serialize variables for TransientMemoryBackend 00/50600/3
authorClaus Due <claus@namelesscoder.net>
Fri, 11 Nov 2016 23:35:37 +0000 (00:35 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 13 Nov 2016 12:59:40 +0000 (13:59 +0100)
commit5d18c6703c70b1bb3f68bd90ce4f1df7de0b7fb4
tree5c944495f7084e8820ea419996631f29339255a6
parent122b5adbe2bab6fe1ba2ded4a43411d75f502839
[BUGFIX] Do not serialize variables for TransientMemoryBackend

This change switches the internal behavior of the VariableFrontend
when combined with the TransientMemoryBackend. Before this
patch the VariableFrontend was only capable of storing strings
and would serialize all variables it received, and unserialize all
variables it retrieves.

Rather than do this unnecessary serializing, a new contract is
implemented to indicate that the backend implementing the
contract is capable of storing non-string values, including
references to objects. When the VariableFrontend detects
this contract it skips the serialize/unserialize steps.

Change-Id: I255dbda2ae3791ad6325c5b4ad67c97e172e22f4
Releases: master, 7.6
Resolves: #78664
Reviewed-on: https://review.typo3.org/50600
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Tested-by: Philipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/core/Classes/Cache/Backend/TransientBackendInterface.php [new file with mode: 0644]
typo3/sysext/core/Classes/Cache/Backend/TransientMemoryBackend.php
typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php