Skip to content

Commit 46b7bf2

Browse files
glyhdannywillems
authored andcommitted
Potential optimization on LMDB Disk Cache: note we could reuse IDs
1 parent 2c0fafe commit 46b7bf2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib/disk_cache/lmdb/disk_cache.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ module Make (Data : Binable.S) = struct
4747
Rw.get ~env db idx |> Option.value_exn
4848

4949
let put ({ env; db; counter; logger; garbage } : t) (x : Data.t) : id =
50+
(* TODO: we may reuse IDs by pulling them from the `garbage` hash set *)
5051
let idx = !counter in
5152
incr counter ;
5253
let res = { idx } in

0 commit comments

Comments
 (0)