implement CalculateCacheType