Unverified Commit c62f2f84 authored by Alex Pott's avatar Alex Pott
Browse files

perf: #3580109 Optimise CacheTagsCheckSumTrait::calculateChecksum()

By: catch
By: berdir
(cherry picked from commit e16c8344d8dbc5fd63f7f1c1f40b72ab5499e2fc)
parent f804c14a
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -155,7 +155,12 @@ protected function calculateChecksum(array $tags) {
      $this->preloadTags = [];
    }

    $query_tags = array_diff($tags_with_preload, array_keys($this->tagCache));
    $query_tags = [];
    foreach ($tags_with_preload as $tag) {
      if (!isset($this->tagCache[$tag])) {
        $query_tags[] = $tag;
      }
    }
    if ($query_tags) {
      $tag_invalidations = $this->getTagInvalidationCounts($query_tags);
      $this->tagCache += $tag_invalidations;