Class: Redcache::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/redcache/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



13
14
15
16
17
18
19
20
21
22
# File 'lib/redcache/configuration.rb', line 13

def initialize
  @cache_time = 86400
  @stale_time = 900
  @encrypt = false
  @secret = nil
  @skip_cache = false
  @silent = false
  @logger = nil
  @log_prefix = "redcache"
end

Instance Attribute Details

#cache_timeObject

Returns the value of attribute cache_time.



5
6
7
# File 'lib/redcache/configuration.rb', line 5

def cache_time
  @cache_time
end

#encryptObject

Returns the value of attribute encrypt.



7
8
9
# File 'lib/redcache/configuration.rb', line 7

def encrypt
  @encrypt
end

#log_prefixObject

Returns the value of attribute log_prefix.



11
12
13
# File 'lib/redcache/configuration.rb', line 11

def log_prefix
  @log_prefix
end

#loggerObject

Returns the value of attribute logger.



10
11
12
# File 'lib/redcache/configuration.rb', line 10

def logger
  @logger
end

#redisObject

Returns the value of attribute redis.



3
4
5
# File 'lib/redcache/configuration.rb', line 3

def redis
  @redis
end

#secretObject

Returns the value of attribute secret.



4
5
6
# File 'lib/redcache/configuration.rb', line 4

def secret
  @secret
end

#silentObject

Returns the value of attribute silent.



9
10
11
# File 'lib/redcache/configuration.rb', line 9

def silent
  @silent
end

#skip_cacheObject

Returns the value of attribute skip_cache.



8
9
10
# File 'lib/redcache/configuration.rb', line 8

def skip_cache
  @skip_cache
end

#stale_timeObject

Returns the value of attribute stale_time.



6
7
8
# File 'lib/redcache/configuration.rb', line 6

def stale_time
  @stale_time
end