[FEATURE] Add hook to cache calculation

Add a hook in the cache hash calculation process, so that
- in particular - parameters can be added to the calculation.

Resolves: #58601
Releases: 1.10
Change-Id: I604e2dc01e014c5b28a6112b52b28142375c9b1b
Reviewed-on: https://review.typo3.org/29968
Reviewed-by: Francois Suter
Tested-by: Francois Suter