This commit is contained in:
albert
2013-02-16 23:01:53 -05:00
parent 6ebfe8440d
commit bc8af7a38c
3 changed files with 7 additions and 2 deletions

View File

@@ -618,7 +618,7 @@ class Post < ActiveRecord::Base
module CacheMethods
def expire_cache(tag_name)
if Post.fast_count("") < 1000
if Post.fast_count("").to_i < 1000
Cache.delete(Post.count_cache_key(""))
end
Cache.delete(Post.count_cache_key(tag_name))