struct Wraith::HashEntry(V)

Overview

Wraps Hash values. Each entry has a value and expiration.

Included Modules

Defined in:

wraithdb/stores/hash_entry.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(value : V, ttl : Time::Span | Nil) #

[View source]
def self.new(pull : MessagePack::Unpacker) #

[View source]

Instance Method Detail

def expired? #

Checks if the entry is expired.


[View source]
def expires_at #

[View source]
def expires_in_ms : Int64 | Nil #

[View source]
def has_expiration? #

[View source]
def update_expiration(ttl : Time::Span | Nil) #

[View source]
def value #

[View source]
def value=(value : V) #

[View source]