:: (cache-get*) ( query table -- rrs/NX/f ) { { [ dup f = ] [ f ] } ! not in the cache { [ dup expired? ] [ query table-rem f ] } ! here but expired { [ dup nx? ] [ NX ] } ! negative result cached { [ t ] [ table query+entry->rrs ] } ! good to go } cond ; : cache-get* ( query -- rrs/NX/f ) dup table-get (cache-get*)