update cache management code