Module: Cash::Index::Attributes

Included in:
Cash::Index
Defined in:
lib/cash/index.rb

Instance Method Summary collapse

Instance Method Details

#buffer ⇒ Object



62
63
64
# File 'lib/cash/index.rb', line 62

def buffer
  options[:buffer]
end

#limit ⇒ Object



58
59
60
# File 'lib/cash/index.rb', line 58

def limit
  options[:limit]
end

#order ⇒ Object



54
55
56
# File 'lib/cash/index.rb', line 54

def order
  @order ||= options[:order] || :asc
end

#ttl ⇒ Object



50
51
52
# File 'lib/cash/index.rb', line 50

def ttl
  @ttl ||= options[:ttl] || config.ttl
end

#window ⇒ Object



66
67
68
# File 'lib/cash/index.rb', line 66

def window
  limit && limit + buffer
end