christopher-dG/TimeToLive.jl

Associative time to live (TTL) cache for Julia

★ 1Forks 0JuliaGitHub ↗Compare

README

TimeToLive Build Status

An associative TTL cache.

julia> using Dates, TimeToLive

julia> ttl = TTL{Int, String}(Second(1))
TTL{Int64,String,Second} with 0 entries

julia> ttl[0] = "foo"
"foo"

julia> ttl[0]
"foo"

julia> sleep(2)

julia> get(ttl, 0, "bar")
"bar"

Contributors

christopher-dG

Issues