You are here

public function Redis_Cache::getValidChecksum in Redis 7.3

Get valid checksum

Parameters

int|string $previous: "TIMESTAMP[.INCREMENT]" string

Return value

string The next "TIMESTAMP.INCREMENT" string.

See also

Redis_Cache::getNextIncrement()

2 calls to Redis_Cache::getValidChecksum()
Redis_Cache::createEntryHash in lib/Redis/Cache.php
Create cache entry
Redis_Cache::setLastFlushTime in lib/Redis/Cache.php
Set last flush time

File

lib/Redis/Cache.php, line 648

Class

Redis_Cache
Because those objects will be spawned during boostrap all its configuration must be set in the settings.php file.

Code

public function getValidChecksum($previous = null) {
  if (time() === (int) $previous) {
    return $this
      ->getNextIncrement($previous);
  }
  else {
    return $this
      ->getNextIncrement();
  }
}