Module: Cash::Index::Attributes

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

Instance Method Summary collapse

Instance Method Details

#bufferObject



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

def buffer
  options[:buffer]
end

#limitObject



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

def limit
  options[:limit]
end

#orderObject



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

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

#order_columnObject



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

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

#ttlObject



46
47
48
# File 'lib/cash/index.rb', line 46

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

#windowObject



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

def window
  limit && limit + buffer
end