[BUGFIX] Increase performance of exports for caches

Exporting arrays for caches is now done with var_export().

Resolves: #51116
Releases: 6.2, 6.1, 6.0
Change-Id: I7519fd9c2ab21cc22a3f4e092b611c6bca58c30f
Reviewed-on: https://review.typo3.org/24052
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn