Skip to main content
CrystalDocs
Search documentation
Search
Browse Docs
CrystalShards
About
class
ExpiringHash(KeyT, ValueT)
Inherits
Reference
<
Object
Constructors
new
(max_items :
Int32
|
Nil
, expiry_period :
Time::Span
)
create a new expiring hash
Source
Instance methods
[]
(key :
KeyT
) :
ValueT
Source
[]=
(key :
KeyT
, value :
ValueT
)
Source
[]?
(key :
KeyT
) :
ValueT
|
Nil
Source
expiry_period
hash properties
Source
expiry_period=
(expiry_period :
Time::Span
)
hash properties
Source
hash
backing hash
Source
hash=
(hash :
Hash
(
KeyT
,
Tuple
(
Time
,
ValueT
)))
backing hash
Source
max_items
Source
max_items=
(max_items :
Int32
|
Nil
)
Source