Browse thread
[Caml-list] Q: automatic forgetting cache, module Weak, Gc control
-
Jan Kybic
-
Jacques GARRIGUE
-
skaller
-
Jan Kybic
- Alex Baretta
- Hendrik Tews
-
Jan Kybic
-
skaller
-
Jacques GARRIGUE
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Hendrik Tews <tews@t...> |
| Subject: | Re: [Caml-list] Re: Q: automatic forgetting cache, module Weak, Gc control |
Jan Kybic <kybic@fel.cvut.cz> 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? Bye, Hendrik ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners