class Orion::Cache
- Orion::Cache
- Reference
- Object
Defined in:
orion/cache.crConstructors
Instance Method Summary
- #clear(*args, **options)
- #clear(*args, **options, &)
-
#delete(keyable : Keyable, value)
Delete the item from cache
- #delete(*args, **options)
- #delete(*args, **options, &)
- #fetch(*args, **options)
-
#fetch(key : Keyable, &block)
Read the item from cache, if it doesn't exist, invoke the block
- #fetch(*args, **options, &)
-
#fetch_if(condition, key, &block)
If the conition is true invoke
#fetch
-
#read(keyable : Keyable)
Read an item from cache
- #read(*args, **options)
- #read(*args, **options, &)
-
#write(keyable : Keyable, value)
Write an item to cache
- #write(*args, **options)
- #write(*args, **options, &)
Constructor Detail
def self.new(store : ::Cache::Store(String, String) = ::Cache::NullStore(String, String).new(expires_in: 0.seconds))
#
Instance Method Detail
Read the item from cache, if it doesn't exist, invoke the block