Module: Cash::Index::Attributes

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

Instance Method Summary collapse

Instance Method Details

#bufferObject



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

def buffer
  options[:buffer]
end

#limitObject



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

def limit
  options[:limit]
end

#orderObject



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

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

#order_columnObject



69
70
71
# File 'lib/cash/index.rb', line 69

def order_column
  options[:order_column] || 'id'
end

#ttlObject



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

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

#windowObject



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

def window
  limit && limit + buffer
end