saved searches: add 'created' and 'posts' columns to index page.

This commit is contained in:
evazion
2019-09-02 22:18:32 -05:00
parent 05d8a05106
commit d5a2ed65f8
2 changed files with 10 additions and 1 deletions

View File

@@ -41,6 +41,11 @@ class SavedSearch < ApplicationRecord
(REDIS_EXPIRY.to_i - ttl).seconds.ago
end
memoize :refreshed_at
def cached_size
SavedSearch.redis.scard("search:#{query}")
end
memoize :cached_size
end
concerning :Labels do