reduce frequency of post count expiration for blank tag case

This commit is contained in:
albert
2013-03-15 13:15:44 -04:00
parent 6afad417aa
commit b5e5607902
2 changed files with 2 additions and 3 deletions

View File

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

View File

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