From abe1ef91376a36cbdd60a4ba95be455723baef5c Mon Sep 17 00:00:00 2001 From: john-gom <116556069+john-gom@users.noreply.github.com> Date: Wed, 14 Jun 2023 17:25:33 +0100 Subject: [PATCH] fix: Build Taxonomies does not cache the full json files (#8557) Also cache .full.json files --- lib/ProductOpener/Tags.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ProductOpener/Tags.pm b/lib/ProductOpener/Tags.pm index 1b39df2d52ffe..0d8d149b3208f 100644 --- a/lib/ProductOpener/Tags.pm +++ b/lib/ProductOpener/Tags.pm @@ -964,6 +964,9 @@ sub get_from_cache ($tagtype, @files) { if ($got_from_cache) { $got_from_cache = get_file_from_cache("$cache_prefix.json", "$tag_www_root.json"); } + if ($got_from_cache) { + $got_from_cache = get_file_from_cache("$cache_prefix.full.json", "$tag_www_root.full.json"); + } if ($got_from_cache) { print "obtained taxonomy for $tagtype from " . ('', 'local', 'GitHub')[$got_from_cache] . " cache.\n"; $cache_prefix = ''; @@ -1011,6 +1014,7 @@ sub put_to_cache ($tagtype, $cache_prefix) { my $tag_www_root = "$www_root/data/taxonomies/$tagtype"; put_file_to_cache("$tag_www_root.json", "$cache_prefix.json"); + put_file_to_cache("$tag_www_root.full.json", "$cache_prefix.full.json"); put_file_to_cache("$tag_data_root.result.txt", "$cache_prefix.result.txt"); put_file_to_cache("$tag_data_root.result.sto", "$cache_prefix.result.sto");