diff src/cache.sml @ 2233:af1585e7d645

More work factoring out Sqlcache back end.
author Ziv Scully <ziv@mit.edu>
date Wed, 06 May 2015 23:11:30 -0400
parents
children 0bdfec16a01d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cache.sml	Wed May 06 23:11:30 2015 -0400
@@ -0,0 +1,16 @@
+structure Cache = struct
+
+type cache =
+     {(* Takes a query ID and parameters (and, for store, the value to
+            store) and gives an FFI call that checks, stores, or flushes the
+            relevant entry. The parameters are strings for check and store and
+            optional strings for flush because some parameters might not be
+            fixed. *)
+      check : int * Mono.exp list -> Mono.exp',
+      store : int * Mono.exp list * Mono.exp -> Mono.exp',
+      flush : int * Mono.exp list -> Mono.exp',
+      (* Generates C needed for FFI calls in check, store, and flush. *)
+      setupGlobal : Print.PD.pp_desc,
+      setupQuery : {index : int, params : int} -> Print.PD.pp_desc}
+
+end