Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Q: automatic forgetting cache, module Weak, Gc control
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-07-02 (08:54)
From: Hendrik Tews <tews@t...>
Subject: Re: [Caml-list] Re: Q: automatic forgetting cache, module Weak, Gc control
Jan Kybic <> writes:

   I think the right idea is to insert each cached values into two
   structures: a weak hashtable so that the value can be found fast, and 
   another global FIFO type structure that will start to drop oldest values when
   there is not enough memory. For efficiency, the FIFO structure will 
   hold blocks (arrays). As the FIFO structure is global and will have to
   hold different types of data, storing Obj.t seems to be apropriate.
Why don't you use a variant type?



To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: