Handbook
Glossary
lru-cache
Vocabulary
lru-cache
Definition
USING:
linked-assocs
;
IN:
lru-cache
TUPLE:
lru-cache
<
linked-assoc
max-size
;
Methods
USING:
accessors
assocs
deques
dlists
kernel
lru-cache
sequences.private
;
M:
lru-cache
at*
[
assoc>>
at*
]
[
dlist>>
dup
]
bi
[
[
delete-node
]
curry
]
dip
[
push-node-back
]
curry
[
[
obj>>
second-unsafe
]
tri
]
2curry
[
when
]
curry
keep
;
USING:
accessors
kernel
lru-cache
;
M:
lru-cache
clone
[
assoc>>
clone
]
[
dlist>>
clone
]
[
max-size>>
]
tri
lru-cache
boa
;
USING:
accessors
assocs
deques
generic
kernel
linked-assocs.private
lru-cache
math
sequences.private
;
M:
lru-cache
set-at
[
M\
lru-cache
set-at
(call-next-method)
]
keep
dup
max-size>>
[
over
assoc>>
assoc-size
<
[
[
dlist>>
pop-front
first-unsafe
]
[
assoc>>
]
[
dlist>>
]
tri
(delete-at)
]
[
drop
]
if
]
[
drop
]
if*
;