ktheory / dalli-elasticache

A wrapper for Dalli with support for AWS ElastiCache
MIT License
128 stars 32 forks source link

Simpler Rails cache store configuration #12

Open zmillman opened 10 years ago

zmillman commented 10 years ago

If feels kind of verbose to create a Dalli::ElastiCache instance, get a list of servers, then use a :dalli_store for the actual application store in production.rb.

I don't know how tricky wrapping ActiveSupport::Cache::DalliStore is, but my ideal configuration would look something more like this:

# in config/environments/production.rb

config.cache_store = :dalli_elasticache_store, "my-cluster.cfg.use1.cache.amazonaws.com:11211", {:expires_in => 1.day}

Other thoughts: Should the store default to reading the endpoint configuration from a config/dalli-elasticache.yml file or be configured in an initializer?

dlackty commented 10 years ago

:+1: for this.

fredrik commented 9 years ago

:+1: