Module: InfoparkComponentCache::DelayedGuard

Includes:
VolatileCache
Included in:
Guards::DelayedLastChanged, Guards::DelayedObjCount, Guards::DelayedValidFrom, Guards::DelayedValidUntil
Defined in:
lib/infopark_component_cache/delayed_guard.rb

Overview

Note:

Including classes must implement options method which completely described the object state and returns a hash.

This module provides an easy way to create delayed guards by using meta programming.

Examples:

Delaying an ObjectCount which guards on :object_count

class DelayedObjectCount < ObjectCount
  include DelayedGuard
  delay :object_count, for: 10.minutes
end

Author:

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Methods included from VolatileCache

#volatile_cache

Class Method Details

.included(base) ⇒ Object



19
20
21
# File 'lib/infopark_component_cache/delayed_guard.rb', line 19

def self.included(base)
  base.send(:extend, ClassMethods)
end