class MemoryCache(K, V)

Defined in:

memory_cache.cr

Constant Summary

VERSION = "0.4.1"

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def cleanup : Int32 #

Cleanups all expired values, and returns the cleaned count.


[View source]
def clear #

[View source]
def delete(k : K) : V | Nil #

[View source]
def each(& : K, V -> ) #

[View source]
def exists?(k : K) : Bool #

[View source]
def fetch(k : K, expires_in = nil, & : -> V) : V #

[View source]
def read(k : K) : V | Nil #

[View source]
def size #

[View source]
def update(k : K, & : V -> V) #

[View source]
def write(k : K, v : V, expires_in = nil) : V #

[View source]