struct Cache::MemoryStore(K, V)

Overview

A cache store implementation which stores everything into memory in the same process.

Defined in:

cache/stores/memory_store.cr

Constructors

Instance Method Summary

Instance methods inherited from struct Cache::Store(K, V)

fetch(key : K, &) fetch

Constructor methods inherited from struct Cache::Store(K, V)

new(expire_time : Time::Span) new

Constructor Detail

def self.new(expire_time : Time::Span) #

[View source]

Instance Method Detail

def fetch(key : K, &) #
Description copied from struct Cache::Store(K, V)

Fetches data from the cache, using the given key. If there is data in the cache with the given key, then that data is returned.

If there is no such data in the cache, then a block will be passed the key and executed in the event of a cache miss.


[View source]