[BUGFIX] Do not serialize variables for TransientMemoryBackend 34/50634/6
authorClaus Due <claus@namelesscoder.net>
Sun, 13 Nov 2016 13:06:06 +0000 (14:06 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 18 Nov 2016 22:00:17 +0000 (23:00 +0100)
commitefdb548ec745ed093bdc7623eaa5714f86e0345d
treed6bdbf790a6c2d640fc5e190c9c87a519a16cec3
parenta2f2a4b1244633bc4031e2f0120c66b8a7769fed
[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/50634
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
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