Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 7c62863b04
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (26 sloc) 1.03 kB
(*
* Copyright (C) 2006-2011 Citrix Systems Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; version 2.1 only. with the special
* exception on linking described in file LICENSE.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*)
type t =
| In_memory of Db_cache_types.Database.t ref ref
| Remote
exception Database_not_in_memory
let in_memory (rf: Db_cache_types.Database.t ref ref) = In_memory rf
let get_database = function
| In_memory x -> !(!(x))
| Remote -> raise Database_not_in_memory
let update_database t f = match t with
| In_memory x ->
let d : Db_cache_types.Database.t = f (get_database t) in
(!(x)) := d
| Remote -> raise Database_not_in_memory
Jump to Line
Something went wrong with that request. Please try again.