You are here

interface TimestampInvalidatorInterface in Memcache API and Integration 8.2

Interface TimestampInvalidatorInterface.

Defines an interface for timestamp-based tag invalidation.

@package Drupal\memcache\Invalidator

Hierarchy

Expanded class hierarchy of TimestampInvalidatorInterface

All classes that implement TimestampInvalidatorInterface

3 files declare their use of TimestampInvalidatorInterface
MemcacheBackend.php in src/MemcacheBackend.php
MemcacheBackendFactory.php in src/MemcacheBackendFactory.php
TimestampCacheTagsChecksum.php in src/Cache/TimestampCacheTagsChecksum.php

File

src/Invalidator/TimestampInvalidatorInterface.php, line 12

Namespace

Drupal\memcache\Invalidator
View source
interface TimestampInvalidatorInterface {

  /**
   * Invalidate the timestamp of a tag.
   *
   * @param string $tag
   *   Tag to invalidate.
   *
   * @return float
   *   New timestamp of tag.
   */
  public function invalidateTimestamp($tag);

  /**
   * Get the last invalidation timestamp of a tag.
   *
   * @param string $tag
   *   Tag to check.
   *
   * @return float
   *   The last invalidation timestamp of the tag.
   */
  public function getLastInvalidationTimestamp($tag);

  /**
   * Get the last invalidation timestamps of a set of tags.
   *
   * @param array $tags
   *   Array of tags to check (keys are ignored.)
   *
   * @return array|bool
   *   The last invalidation timestamps on file, or FALSE on failure.
   */
  public function getLastInvalidationTimestamps(array $tags);

  /**
   * Get the current timestamp, optionally offset by a number.
   *
   * The standard granularity of the resulting timestamp is three decimal
   * places, (1 millisecond).
   *
   * @param float $offset
   *   Offset to apply to timestamp before rounding.
   *
   * @return float
   *   Current timestamp in decimal seconds.
   */
  public function getCurrentTimestamp($offset = 0.0);

}

Members

Namesort descending Modifiers Type Description Overrides
TimestampInvalidatorInterface::getCurrentTimestamp public function Get the current timestamp, optionally offset by a number. 1
TimestampInvalidatorInterface::getLastInvalidationTimestamp public function Get the last invalidation timestamp of a tag. 1
TimestampInvalidatorInterface::getLastInvalidationTimestamps public function Get the last invalidation timestamps of a set of tags. 1
TimestampInvalidatorInterface::invalidateTimestamp public function Invalidate the timestamp of a tag. 1