Module: TaggableCache
- Extended by:
- TaggableCache
- Included in:
- TaggableCache
- Defined in:
- lib/taggable_cache.rb,
lib/taggable_cache/railtie.rb,
lib/taggable_cache/version.rb,
lib/taggable_cache/extensions/cache_store.rb,
lib/taggable_cache/extensions/active_record.rb,
lib/taggable_cache/extensions/action_controller.rb
Defined Under Namespace
Modules: ActionControllerExtension, ActiveRecordExtension, ActiveRecordModelExtension, CacheStoreExtension, Store Classes: Railtie
Constant Summary collapse
- VERSION =
This is for the gem and does not conflict with the rest of the functionality
"0.5"
Instance Method Summary collapse
-
#new_store ⇒ Object
Creates new Taggable store instance based on current settings.
- #settings ⇒ Object
- #settings=(value) ⇒ Object
Instance Method Details
#new_store ⇒ Object
Creates new Taggable store instance based on current settings
13 14 15 16 17 18 19 20 |
# File 'lib/taggable_cache.rb', line 13 def new_store params = settings.dup params.delete(:store) cls = Store::const_get(settings[:store].to_s.camelize) cls.send(:new, params) end |
#settings ⇒ Object
4 5 6 |
# File 'lib/taggable_cache.rb', line 4 def settings @@settings ||= {:store => :redis, :host => '127.0.0.1', :port => 6379} end |
#settings=(value) ⇒ Object
8 9 10 |
# File 'lib/taggable_cache.rb', line 8 def settings=(value) @@settings = value end |