reduce frequency of post count expiration for blank tag case
This commit is contained in:
@@ -319,7 +319,7 @@ class Post < ActiveRecord::Base
|
||||
execute_sql("UPDATE tags SET post_count = post_count + 1 WHERE name IN (?)", increment_tags) if increment_tags.any?
|
||||
Post.expire_cache_for_all(decrement_tags)
|
||||
Post.expire_cache_for_all(increment_tags)
|
||||
Post.expire_cache_for_all([""])
|
||||
Post.expire_cache_for_all([""]) if new_record? || id <= 100_000
|
||||
end
|
||||
|
||||
def set_tag_counts
|
||||
|
||||
@@ -6,8 +6,7 @@ require 'bundler/capistrano'
|
||||
set :bundle_flags, "--deployment --quiet --binstubs --shebang ruby-local-exec"
|
||||
|
||||
set :default_environment, {
|
||||
"PATH" => '$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH',
|
||||
"NRCONFIG" => "/var/www/danbooru2/shared/config/newrelic.yml"
|
||||
"PATH" => '$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH'
|
||||
}
|
||||
|
||||
set :whenever_command, "bundle exec whenever"
|
||||
|
||||
Reference in New Issue
Block a user