class Fastentry::RedisCache
Public Instance Methods
keys()
click to toggle source
# File lib/fastentry.rb, line 91 def keys cache.redis.keys end
number_of_keys()
click to toggle source
# File lib/fastentry.rb, line 95 def number_of_keys cache.redis.dbsize end
search(query: '')
click to toggle source
# File lib/fastentry.rb, line 108 def search(query: '') cache.redis.scan_each(match: "*#{query.downcase}*").to_a.uniq end
select(from: 0, amount: 20)
click to toggle source
# File lib/fastentry.rb, line 99 def select(from: 0, amount: 20) count = adjusted_amount(from, amount) if count <= 0 count = 1 end cache.redis.scan(from, count: count)[1] end