got rid of removedpost, restore classic is_deleted mechanics

This commit is contained in:
albert
2011-02-12 17:37:48 -05:00
parent 33f5350677
commit f48000a8b5
21 changed files with 204 additions and 371 deletions

View File

@@ -5,6 +5,14 @@ class Cache
ActiveRecord::Base.logger.debug('MemCache Incr %s' % [key])
end
def self.decr(key, expiry = 0)
val = Cache.get(key, expiry)
if val.to_i > 0
Cache.put(key, val.to_i - 1)
end
ActiveRecord::Base.logger.debug('MemCache Decr %s' % [key])
end
def self.get_multi(keys, prefix, expiry = 0)
key_to_sanitized_key_hash = keys.inject({}) do |hash, x|
hash[x] = "#{prefix}:#{Cache.sanitize(x)}"