Fix type error in cache.