[BUGFIX] Performance: remove unneeded basename call in CacheManager

$filename is already containing basername from $pathAndFilename
thus replace in if and else basename($pathAndFilename) by
filename

Resolves: #53478
Releases: 6.2
Change-Id: Ia71d4ec654edd6effb7c8b290d0738f5f1a77bb4
Reviewed-on: https://review.typo3.org/25245
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter