Store the old OTP timestamp.

@param $key

@return mixed
504707
protected function storeOldTimestamp($key)
    {
        return $this->config('forbid_old_passwords') === true
            ? $this->sessionPut(Constants::SESSION_OTP_TIMESTAMP, $key)
            : $key;
    }
71365
public function read($key)
    {
        $key = $this->_key($key);
        if (!isset($this->data[$key])) {
            return false;
        }
        $data = $this->data[$key];

        // Check expiration
        $now = time();
        if ($data['exp'] <= $now) {
            unset($this->data[$key]);

            return false;
        }

        return $data['val'];
    }
894964
public function retrieve($key, $timestamp = false)
    {
        $cachedData = $this->_loadCache();
        (false === $timestamp) ? $type = 'data' : $type = 'time';
        return gzuncompress(base64_decode($cachedData[$key][$type], 9));
    }
1096629
public function get($key)
    {
        $file = $this->makePath($key);
        if (!($data = @file_get_contents($file))) {
            return false;
        }

        if (!($data = @unserialize($data))) {
            $this->delete($key); /* Delete corrupted. */
            return false;
        }

        list($expiry, $value) = $data;
        if ($expiry !== false && ($expiry < microtime(true))) {
            $this->delete($key);
            return false;
        }

        return $value;
    }
129427
public function getTimestamp($path)
    {
        $meta = $this->getMetadata($path);

        return isset($meta['LastModified'])
            ? ['timestamp' => strtotime($meta['LastModified'])] : false;
    }
1120058
public function expiration($key)
	{
		if (isset($this->data[static::EXPIRE_DATA_KEY][$key]))
		{
			$expiration = array(
				$this->data[static::EXPIRE_DATA_KEY][$key][0] == EXPIRE_ON_REQUEST ? 'EXPIRE_ON_REQUEST' : 'EXPIRE_ON_GET',
				$this->data[static::EXPIRE_DATA_KEY][$key][1] == static::EXPIRE_STATE_NEW ? 'STATE_NEW' : ($this->data[static::EXPIRE_DATA_KEY][$key][1] == static::EXPIRE_STATE_LOADED ? 'STATE_LOADED' : 'STATE_EXPIRED'),
			);
			return $expiration;
		}

		return false;
	}
472044
protected function retrieve($key)
    {
        if (!$this->has($key)) {
            return null;
        }

        $cache = file_get_contents($this->path . $key);

        // compare the timestamp to the current time when we read the file.
        if (time() >= substr($cache, 0, 10)) {
            $this->forget($key);
            return null;
        }

        return unserialize(substr($cache, 10));
    }
713750
public function getPersistentData ($key, $default = false)
    {
        if (!in_array($key, self::$kSupportedKeys)) {
            return $default;
        }

        $lines = $this->getDataInFile();
        return array_key_exists($key, $lines) ?  $lines[$key] : $default;
    }
353586
public function expireat($key, $timestamp)
    {
        $this->init();
        $result = $this->driver->expireat($key, $timestamp);
        return (bool)$result;
    }
40389
public function mtime($key)
    {
        $this->init();
        list($containerName, $key) = $this->tokenizeKey($key);

        try {
            $properties = $this->blobProxy->getBlobProperties($containerName, $key);

            return $properties->getProperties()->getLastModified()->getTimestamp();
        } catch (ServiceException $e) {
            $this->failIfContainerNotFound($e, sprintf('read mtime for key "%s"', $key), $containerName);

            return false;
        }
    }
542798
public function fetch($key)
    {
        $file_name = $this->getFilePath($key);
        if (!\file_exists($file_name) || !\is_readable($file_name)) {
            return false;
        } else {
            $h = \fopen($file_name, 'r');
            //lock file
            \flock($h, LOCK_SH);
        }

        $data = \file_get_contents($file_name);

        //release lock
        \fclose($h);

        $data = @\unserialize($data);

        //check to see if it expired
        if ($data && ($data[0] == 0 || time() <= $data[0])) {
            return $data[1];
        } else {
            $this->delete($key);
            return false;
        }

        return $data[1];
    }
683824
public function get($key, $timestamp = false)
    {
        if ($this->where == true) {
            $this->setCache($key)->setPath(CYGNITE_BASE.DS.toPath('public.storage.cache').DS);
        }

        $cached = [];
        $cached = $this->getCache();

        if ($timestamp === false) {
            return $cached[$key]['data'];
        } else {
            return $cached[$key]['time'];
        }
    }
661544
public function getItemTtl($key)
    {
        if (isset($_SESSION['__CACHE__'][$key])) {
            $data = json_decode($_SESSION['__CACHE__'][$key], true);
            if ($data['ttl'] === 0 || (time() - $data['start'] <= $data['ttl'])) {
                $ttl = $data['ttl'];
            } else {
                $this->deleteItem($key);
            }
        }

        return (isset($ttl)) ? $ttl : false;
    }
611243
public function get($key)
    {
        $getResult = $this->getValue($key);
        $unserialized = @unserialize($getResult);

        if (Util::hasInternalExpireTime($unserialized)) {
            $getResult = $unserialized['v'];
        }

        return $getResult;
    }
1082438
protected function parseTransactionTimestamp($key)
    {
        $results = [];
        if (preg_match('/^:' . $key . ':(\d{6})/', $this->getCurrentTransactionData(), $results)
            && !empty($results[1])
        ) {
            return $this->sanitizeTimestamp($results[1]);
        }

        return 0;
    }
887561
public function get($key) {
        if (isset($this->store[$key])) {
            if ($this->ttl == 0) {
                $value = $this->store[$key][0];
                if ($this->maxsize !== false) {
                    // Make sure the element is now in the end of array.
                    $this->set($key, $value);
                }
                return $value;
            } else if ($this->store[$key][1] >= (cache::now() - $this->ttl)) {
                return $this->store[$key][0];
            } else {
                // Element is present but has expired.
                $this->check_ttl();
            }
        }
        return false;
    }
882286
public function isExpired($key, $time)
    {
        return $this->getCreatedTime($key) + $this->getTtl($key) < $time;
    }