comparison src/toy_cache.sml @ 2286:0bdfec16a01d

Fix issue with one-element caches. Locking still WIP.
author Ziv Scully <ziv@mit.edu>
date Fri, 13 Nov 2015 01:04:32 -0500
parents a647a1560628
children
comparison
equal deleted inserted replaced
2285:ad3ce1528f71 2286:0bdfec16a01d
21 fun store (index, keys, value) = 21 fun store (index, keys, value) =
22 ffiAppCache' ("store", index, (value, stringTyp) :: withTyp stringTyp keys) 22 ffiAppCache' ("store", index, (value, stringTyp) :: withTyp stringTyp keys)
23 23
24 fun flush (index, keys) = 24 fun flush (index, keys) =
25 ffiAppCache' ("flush", index, withTyp optionStringTyp keys) 25 ffiAppCache' ("flush", index, withTyp optionStringTyp keys)
26
27 fun lock (index, keys) =
28 raise Fail "ToyCache doesn't yet implement lock"
26 29
27 30
28 (* Cjr *) 31 (* Cjr *)
29 32
30 open Print 33 open Print
196 val setupGlobal = string "/* No global setup for toy cache. */" 199 val setupGlobal = string "/* No global setup for toy cache. */"
197 200
198 201
199 (* Bundled up. *) 202 (* Bundled up. *)
200 203
201 val cache = {check = check, store = store, flush = flush, 204 val cache = {check = check, store = store, flush = flush, lock = lock,
202 setupQuery = setupQuery, setupGlobal = setupGlobal} 205 setupQuery = setupQuery, setupGlobal = setupGlobal}
203 206
204 end 207 end