Class: CacheManager::Stats
- Inherits:
-
Object
- Object
- CacheManager::Stats
- Defined in:
- app/models/cache_manager/stats.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Class Method Summary collapse
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize ⇒ Stats
constructor
A new instance of Stats.
Constructor Details
#initialize ⇒ Stats
Returns a new instance of Stats.
5 6 7 |
# File 'app/models/cache_manager/stats.rb', line 5 def initialize @klass = Rails.cache.class.to_s end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
3 4 5 |
# File 'app/models/cache_manager/stats.rb', line 3 def klass @klass end |
Class Method Details
.all ⇒ Object
10 11 12 |
# File 'app/models/cache_manager/stats.rb', line 10 def all new.all end |
Instance Method Details
#all ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/models/cache_manager/stats.rb', line 15 def all case @klass when 'ActiveSupport::Cache::FileStore' {} else Rails.cache.stats end end |