function CacheTagsChecksumDecorator::logCacheTagOperation

Same name and namespace in other branches
  1. 10 core/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php \Drupal\performance_test\Cache\CacheTagsChecksumDecorator::logCacheTagOperation()

Logs a cache tag operation.

Parameters

string[] $tags: The cache tags.

float $start: The start microtime.

float $stop: The stop microtime.

\Drupal\performance_test\Cache\CacheTagOperation $operation: The type of operation being logged.

Return value

void

3 calls to CacheTagsChecksumDecorator::logCacheTagOperation()
CacheTagsChecksumDecorator::getCurrentChecksum in core/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php
Returns the sum total of validations for a given set of tags.
CacheTagsChecksumDecorator::invalidateTags in core/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php
Marks cache items with any of the specified tags as invalid.
CacheTagsChecksumDecorator::isValid in core/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php
Returns whether the checksum is valid for the given cache tags.

File

core/modules/system/tests/modules/performance_test/src/Cache/CacheTagsChecksumDecorator.php, line 88

Class

CacheTagsChecksumDecorator
Wraps an existing cache tags checksum invalidator to track calls separately.

Namespace

Drupal\performance_test\Cache

Code

protected function logCacheTagOperation(array $tags, float $start, float $stop, CacheTagOperation $operation) : void {
    $this->performanceDataCollector
        ->addCacheTagOperation([
        'operation' => $operation,
        'tags' => implode(', ', $tags),
        'start' => $start,
        'stop' => $stop,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.