Skip to content

Commit

Permalink
fix: Build Taxonomies does not cache the full json files (#8557)
Browse files Browse the repository at this point in the history
Also cache .full.json files
  • Loading branch information
john-gom committed Jun 14, 2023
1 parent 2472419 commit abe1ef9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ProductOpener/Tags.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down Expand Up @@ -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");

Expand Down

0 comments on commit abe1ef9

Please sign in to comment.