[TASK] Improve caching + clearing

Change-Id: I8df7ce47dd6b8ee5bc06432febfc2fd16e16c05f
Resolves: #59572
Reviewed-on: http://review.typo3.org/31126
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>