Fix #3943: Eliminate legacy code for distributed memcached servers.

This commit is contained in:
evazion
2018-10-04 13:22:49 -05:00
parent 060112293b
commit 4ab97a01bd
3 changed files with 0 additions and 19 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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