making cache parameterized