Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / memcache / src / Invalidator / TimestampInvalidatorInterface.php
1 <?php
2
3 namespace Drupal\memcache\Invalidator;
4
5 /**
6  * Interface TimestampInvalidatorInterface.
7  *
8  * Defines an interface for timestamp-based tag invalidation.
9  *
10  * @package Drupal\memcache\Invalidator
11  */
12 interface TimestampInvalidatorInterface {
13
14   /**
15    * Invalidate the timestamp of a tag.
16    *
17    * @param string $tag
18    *   Tag to invalidate.
19    *
20    * @return float
21    *   New timestamp of tag.
22    */
23   public function invalidateTimestamp($tag);
24
25   /**
26    * Get the last invalidation timestamp of a tag.
27    *
28    * @param string $tag
29    *   Tag to check.
30    *
31    * @return float
32    *   The last invalidation timestamp of the tag.
33    */
34   public function getLastInvalidationTimestamp($tag);
35
36   /**
37    * Get the last invalidation timestamps of a set of tags.
38    *
39    * @param array $tags
40    *   Array of tags to check (keys are ignored.)
41    *
42    * @return array|bool
43    *   The last invalidation timestamps on file, or FALSE on failure.
44    */
45   public function getLastInvalidationTimestamps(array $tags);
46
47   /**
48    * Get the current timestamp, optionally offset by a number.
49    *
50    * The standard granularity of the resulting timestamp is three decimal
51    * places, (1 millisecond).
52    *
53    * @param float $offset
54    *   Offset to apply to timestamp before rounding.
55    *
56    * @return float
57    *   Current timestamp in decimal seconds.
58    */
59   public function getCurrentTimestamp($offset = 0.0);
60
61 }