module

HashFile

HashFile stores data into a file

Constants

VERSION = "0.6.0"

Instance methods

[](key : String)

get value for a given key

Source
[]=(key : String, value : String | Number | Time)

set value for a given key

Source
clear

flush files from disk

Source
config(options : Hash(String, String | Number) = {} of String => String | Int32)

overwrite default configuation settings spread: the amount of sub directories to transform the key hash into base_dir: where should your cache be located

Source
delete(key : String)

delete a key

Source
expired?(key : String)

check if a key is expired

Source
fetch(key : String, options : Hash(String, String | Int32 | Time))

get value for a given key.

Source
key?(value : String)

does your key exists

Source
store(key : String, value : String | Number | Time, options : Hash(String, String | Int32 | Time))

set value for a given key

Source
to_filename(value : String, ommit_base_dir : Bool = false)

converts a key into a hash

Source