Closed ericphanson closed 1 year ago
julia> lru = LRU{Int, Vector{Int}}(; maxsize=10, by=length) LRU{Int64, Vector{Int64}}(; maxsize = 10) julia> get!(lru, 1, 1:9) 1:9 julia> lru LRU{Int64, Vector{Int64}} with 1 entry: 1 => [1, 2, 3, 4, 5, 6, 7, 8, 9] julia> get!(lru, 2, 1:11) 1:11 julia> lru LRU{Int64, Vector{Int64}}(; maxsize = 10)
Since 1:11 is too big, I would prefer we just skip the cache here entirely, rather than evict any entries and end up with an empty cache.
1:11
Yes I guess that would be an easy modification.
Since
1:11
is too big, I would prefer we just skip the cache here entirely, rather than evict any entries and end up with an empty cache.