class Orion::Cache

Defined in:

orion/cache.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(store : ::Cache::Store(String, String) = ::Cache::NullStore(String, String).new(expires_in: 0.seconds)) #

[View source]

Instance Method Detail

def clear(*args, **options) #

[View source]
def clear(*args, **options, &) #

[View source]
def delete(keyable : Keyable, value) #

Delete the item from cache


[View source]
def delete(*args, **options) #

[View source]
def delete(*args, **options, &) #

[View source]
def fetch(*args, **options) #

[View source]
def fetch(key : Keyable, &block) #

Read the item from cache, if it doesn't exist, invoke the block


[View source]
def fetch(*args, **options, &) #

[View source]
def fetch_if(condition, key, &block) #

If the conition is true invoke #fetch


[View source]
def read(keyable : Keyable) #

Read an item from cache


[View source]
def read(*args, **options) #

[View source]
def read(*args, **options, &) #

[View source]
def write(keyable : Keyable, value) #

Write an item to cache


[View source]
def write(*args, **options) #

[View source]
def write(*args, **options, &) #

[View source]