fix: cache rollback

This commit is contained in:
yystopf 2022-02-17 11:12:50 +08:00
parent 90dbe0730a
commit b11f5fd228
1 changed files with 3 additions and 0 deletions

View File

@ -171,6 +171,9 @@ class Project < ApplicationRecord
if changes[:is_public][0] && !changes[:is_public][1]
CacheAsyncClearJob.perform_later('project_rank_service', self.id)
end
if !changes[:is_public][0] && changes[:is_public][1]
$redis_cache.srem("v2-project-rank-deleted", self.id)
end
end
end