def _invalidate_caches(self, xform): for device_id in { None, xform.metadata.deviceID if xform.metadata else None }: self._invalidate_restore_payload_path_cache(xform, device_id) if ASYNC_RESTORE.enabled(self.domain): self._invalidate_async_restore_task_id_cache(xform, device_id)
def _invalidate_caches(self, user_id): """invalidate cached initial restores""" initial_restore_cache_key = self._restore_cache_key(RESTORE_CACHE_KEY_PREFIX, user_id, version=V2) self._cache.delete(initial_restore_cache_key) if ASYNC_RESTORE.enabled(self.domain): self._invalidate_async_caches(user_id)
def _invalidate_caches(self, xform): for device_id in {None, xform.metadata.deviceID if xform.metadata else None}: self._invalidate_restore_payload_path_cache(xform, device_id) if ASYNC_RESTORE.enabled(self.domain): self._invalidate_async_restore_task_id_cache(xform, device_id)