From a0c70a7cd9ce656a443bf8e2a8ad0b732efa0e73 Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Wed, 21 Feb 2018 13:42:50 -0800 Subject: [PATCH] Add caching example to Seattle fixture. --- fixtures/seattle.script | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fixtures/seattle.script b/fixtures/seattle.script index 3c8695b5..a23f5a75 100644 --- a/fixtures/seattle.script +++ b/fixtures/seattle.script @@ -18,3 +18,11 @@ .q [:find ?n . :where [(fulltext $ :community/name "Wallingford") [[?e ?n]]]] .q [:find [?when ...] :where [_ :db/txInstant ?when] :order (asc ?when)] + +.cache :neighborhood/name reverse +.cache :neighborhood/district forward + +.q [:find ?district :where + [?neighborhood :neighborhood/name "Beacon Hill"] + [?neighborhood :neighborhood/district ?d] + [?d :district/name ?district]]