Module: Cash::Index::Attributes

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

Instance Method Summary collapse

Instance Method Details

#bufferObject



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

def buffer
  options[:buffer]
end

#limitObject



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

def limit
  options[:limit]
end

#orderObject



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

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

#order_columnObject



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

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

#ttlObject



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

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

#windowObject



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

def window
  limit && limit + buffer
end