class Cachext::Options

Attributes

default[R]
errors[R]
expires_in[R]
heartbeat_expires[R]
not_found_error[R]
reraise_errors[R]

Public Class Methods

new(config, expires_in: config.default_expires_in, default: nil, errors: config.default_errors, reraise_errors: true, not_found_error: config.not_found_errors, heartbeat_expires: config.heartbeat_expires, cache: true) click to toggle source
# File lib/cachext/options.rb, line 11
def initialize config,
               expires_in: config.default_expires_in,
               default: nil,
               errors: config.default_errors,
               reraise_errors: true,
               not_found_error: config.not_found_errors,
               heartbeat_expires: config.heartbeat_expires,
               cache: true

  @expires_in = expires_in
  @default = default
  @errors = errors
  @reraise_errors = reraise_errors
  @not_found_error = not_found_error
  @heartbeat_expires = heartbeat_expires
  @cache = cache
end

Public Instance Methods

cache?() click to toggle source
# File lib/cachext/options.rb, line 29
def cache?
  @cache
end