CacheHandling cleanup + add more tests
Merge pull request #1280 from pdalpra/cache-handling-cleanup

CacheHandling cleanup + more tests