Ensure that the cache is only set once