diff options
Diffstat (limited to 'caching-tests/bench.ur')
-rw-r--r-- | caching-tests/bench.ur | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/caching-tests/bench.ur b/caching-tests/bench.ur index 0c7bb674..d9c298c8 100644 --- a/caching-tests/bench.ur +++ b/caching-tests/bench.ur @@ -3,6 +3,7 @@ table tab : {Id : int, Val : int} PRIMARY KEY Id fun check id = res <- oneOrNoRows (SELECT tab.Val FROM tab WHERE tab.Id = {[id]}); return <xml><body> + cache {case res of None => <xml>?</xml> | Some row => <xml>{[row.Tab.Val]}</xml>} @@ -13,12 +14,3 @@ fun flush id = return <xml><body> Changed {[id]}! </body></xml> - -fun main x y = - r <- rand; - let - val id = r % x - val doFlush = (r / x) % y = 0 - in - if doFlush then flush id else check id - end |