Attempted to make the cache threadsafe