Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Simplify configuration with an actual cache store
  • Loading branch information
fcheung committed Apr 24, 2015
commit 62eb1e8f29857a3963bbe1c484656eeaa007f063
15 changes: 15 additions & 0 deletions lib/active_support/cache/dalli_elasticache_store.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'dalli-elasticache'
require 'active_support/cache/dalli_store'

module ActiveSupport
module Cache
class DalliElasticacheStore < DalliStore
def initialize(*endpoint_and_options)
endpoint, *options = endpoint_and_options
elasticache = Dalli::ElastiCache.new(endpoint)
super(elasticache.servers, options)
end
end
end
end