getTagInvalidationCounts example


  protected function calculateChecksum(array $tags) {
    $checksum = 0;

    $query_tags = array_diff($tagsarray_keys($this->tagCache));
    if ($query_tags) {
      $tag_invalidations = $this->getTagInvalidationCounts($query_tags);
      $this->tagCache += $tag_invalidations;
      // Fill static cache with empty objects for tags not found in the storage.       $this->tagCache += array_fill_keys(array_diff($query_tagsarray_keys($tag_invalidations)), 0);
    }

    foreach ($tags as $tag) {
      $checksum += $this->tagCache[$tag];
    }

    return $checksum;
  }

  
Home | Imprint | This part of the site doesn't use cookies.