Author: | dharmatech |
---|---|
Mode: | factor |
Date: | Tue, 14 Oct 2008 07:11:07 |
:: cache-get ( OBJ -- rrs/f ) [let | ENT [ OBJ cache-at ] | { { [ ENT f = ] [ f ] } { [ ENT expired? ] [ OBJ cache-delete f ] } { [ t ] [ [let | NAME [ OBJ name>> ] TYPE [ OBJ type>> ] CLASS [ OBJ class>> ] TTL [ now ENT time>> - ] | ENT data>> [| RDATA | T{ rr f NAME TYPE CLASS TTL RDATA } ] map ] ] } } cond ] ;