module HashFile
Overview
HashFile stores data into a file
Extended Modules
Defined in:
hash_file.crhash_file/version.cr
Constant Summary
-
VERSION =
"0.6.0"
Instance Method Summary
-
#[](key : String)
get value for a given key
-
#[]=(key : String, value : String | Number | Time)
set value for a given key
-
#clear
flush files from disk
-
#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
-
#delete(key : String)
delete a key
-
#expired?(key : String)
check if a key is expired
-
#fetch(key : String, options : Hash(String, String | Int32 | Time))
get value for a given key.
-
#key?(value : String)
does your key exists
-
#store(key : String, value : String | Number | Time, options : Hash(String, String | Int32 | Time))
set value for a given key
-
#to_filename(value : String, ommit_base_dir : Bool = false)
converts a key into a hash
Instance Method Detail
overwrite default configuation settings spread: the amount of sub directories to transform the key hash into base_dir: where should your cache be located
def store(key : String, value : String | Number | Time, options : Hash(String, String | Int32 | Time))
#
set value for a given key