def clear_release_environment_project_cache(instance: ReleaseEnvironment, **kwargs: Any) -> None: release_project_ids = instance.release.projects.values_list("id", flat=True) cache.delete_many([ get_project_release_cache_key(proj_id, instance.environment_id) for proj_id in release_project_ids ])
def clear_release_cache(instance, **kwargs): release_project_ids = instance.projects.values_list("id", flat=True) cache.delete_many([ get_project_release_cache_key(proj_id) for proj_id in release_project_ids ])
def clear_cached_photos(self): cache.delete_many([self.get_cache_key(x) for x in self.ALLOWED_SIZES])
def clear_cached_photos(self): cache.delete_many(map(self.get_cache_key, self.ALLOWED_SIZES))