Cache docvecs to reduce memory footprint

Change-Id: I985b9935b2f7cc41583f93250b8202cdcd3cd10c
diff --git a/t/list2vc-def.t b/t/list2vc-def.t
index 37adadb..95b212e 100644
--- a/t/list2vc-def.t
+++ b/t/list2vc-def.t
@@ -80,5 +80,13 @@
 is($faz->{value}->[0], 'F97', 'Value');
 is($faz->{value}->[1], 'F99', 'Value');
 
+my $list_long = catfile(dirname(__FILE__), 'data', 'corp-w-short.def');
+$json = decode_json(join('', `$script def $list_long`))->{collection};
+is($json->{'@type'}, 'koral:doc', 'DocVec');
+is($json->{key}, 'textSigle', 'Key');
+is($json->{value}->[0], 'A97/APR/00001', 'Value');
+is($json->{value}->[1], 'A97/APR/00002', 'Value');
+is($json->{value}->[-1], 'A97/APR/01001', 'Value');
+
 done_testing;
 __END__