Fix #3943: Eliminate legacy code for distributed memcached servers.
This commit is contained in:
@@ -139,9 +139,6 @@ class Tag < ApplicationRecord
|
||||
|
||||
def update_category_cache_for_all
|
||||
update_category_cache
|
||||
Danbooru.config.other_server_hosts.each do |host|
|
||||
delay(:queue => host).update_category_cache
|
||||
end
|
||||
delay(:queue => "default", :priority => 10).update_category_post_counts
|
||||
end
|
||||
|
||||
|
||||
@@ -22,11 +22,6 @@ class TagAlias < TagRelationship
|
||||
def clear_all_cache
|
||||
TagAlias.clear_cache_for(antecedent_name)
|
||||
TagAlias.clear_cache_for(consequent_name)
|
||||
|
||||
Danbooru.config.other_server_hosts.each do |host|
|
||||
TagAlias.delay(:queue => host).clear_cache_for(antecedent_name)
|
||||
TagAlias.delay(:queue => host).clear_cache_for(consequent_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -84,7 +84,6 @@ class User < ApplicationRecord
|
||||
before_create :encrypt_password_on_create
|
||||
before_update :encrypt_password_on_update
|
||||
after_save :update_cache
|
||||
after_update :update_remote_cache
|
||||
before_create :promote_to_admin_if_first_user
|
||||
before_create :customize_new_user
|
||||
#after_create :notify_sock_puppets
|
||||
@@ -172,16 +171,6 @@ class User < ApplicationRecord
|
||||
Cache.put("uin:#{id}", name, 4.hours)
|
||||
Cache.put("uni:#{Cache.hash(name)}", id, 4.hours)
|
||||
end
|
||||
|
||||
def update_remote_cache
|
||||
if saved_change_to_name?
|
||||
Danbooru.config.other_server_hosts.each do |server|
|
||||
delay(queue: server).update_cache
|
||||
end
|
||||
end
|
||||
rescue Exception
|
||||
# swallow, since it'll be expired eventually anyway
|
||||
end
|
||||
end
|
||||
|
||||
module PasswordMethods
|
||||
|
||||
Reference in New Issue
Block a user