Introduce caching for all query methods

Change-Id: Ibe43ccc18114f64d30e7e8f1162239daf78090c0
diff --git a/t/match_info.t b/t/match_info.t
index 58191a5..c07e7aa 100644
--- a/t/match_info.t
+++ b/t/match_info.t
@@ -29,6 +29,7 @@
   ->status_is(200)
   ->json_is('/textSigle', 'WPD15/232/39681')
   ->json_like('/snippet', qr!<span class=\"context-left\">!)
+  ->json_is('/X-cached', undef)
   ;
 
 $t->get_ok('/corpus2/GOE/AGF/02286/p75682-75683')
@@ -89,6 +90,14 @@
   ->json_is('/notifications/0/1', 'Message structure failed')
   ;
 
+# Get from cache
+$t->get_ok('/corpus2/WPD15/232/39681/p2133-2134?spans=false&foundry=*')
+  ->status_is(200)
+  ->json_is('/textSigle', 'WPD15/232/39681')
+  ->json_like('/snippet', qr!<span class=\"context-left\">!)
+  ->json_is('/X-cached', 1)
+  ;
+
 
 done_testing;
 __END__