huacnlee/rails-settings-cached — pull request #28 by ZubKonst (2013-06-27 19:52:57+00:00)
Title: move cache_store(Rails.cache) to method

With these changes, gem can be used independently of the `Rails`.

In my case, I requie "activerecord" and "activesupport" (without Rails).
I can use 'rails-settings-cached' in daemons as well as in my Rails app (with single cache_store)

For non-Rails usage you can define cache_store like this:
```
class Settings < RailsSettings::CachedSettings
def self.cache_store
ActiveSupport::Cache.lookup_store(:redis_store)
end
end
```
or
```
class Settings < RailsSettings::CachedSettings
def self.cache_store
@redis_cache_store ||=
if defined?(Rails)
Rails.cache
else
ActiveSupport::Cache.lookup_store(:redis_store)
end
end
end
```