Method: Readthis::Cache#initialize
- Defined in:
- lib/readthis/cache.rb
#initialize(options = {}) ⇒ Cache
Creates a new Readthis::Cache object with the given options.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/readthis/cache.rb', line 50 def initialize( = {}) @options = @entity = Readthis::Entity.new( marshal: .fetch(:marshal, Marshal), compress: .fetch(:compress, false), threshold: .fetch(:compression_threshold, 1024) ) @pool = ConnectionPool.new(()) do Redis.new(.fetch(:redis, {})) end @scripts = Readthis::Scripts.new end |