] [ drop ] if
] [ drop ] if* ;
+M: lru-cache clone
+ [ assoc>> clone ] [ dlist>> clone ] [ max-size>> ] tri
+ lru-cache boa ;
+
TUPLE: fifo-cache < linked-assoc max-size ;
: <fifo-cache> ( max-size exemplar -- assoc )
] [ drop ] if
] [ drop ] if* ;
+M: fifo-cache clone
+ [ assoc>> clone ] [ dlist>> clone ] [ max-size>> ] tri
+ fifo-cache boa ;
+
TUPLE: lifo-cache < linked-assoc max-size ;
: <lifo-cache> ( max-size exemplar -- assoc )
[ dlist>> ] tri (delete-at)
] when
] when* call-next-method ;
+
+M: lifo-cache clone
+ [ assoc>> clone ] [ dlist>> clone ] [ max-size>> ] tri
+ lifo-cache boa ;