Add cacheFunc type for tests