public function store($id, $data, $maxLifetimeSeconds = null)
    {
        $creationTimestamp = time();

        if (null === $maxLifetimeSeconds) {
            $expirationTimestamp = null;
        } else {
            $expirationTimestamp = ($creationTimestamp + (int) $maxLifetimeSeconds);
        }

        $entry = new CacheEntry($id, $data, $creationTimestamp, $expirationTimestamp);

        $this->storage->store($entry);

        return $this;
    }
public function store($id, $data, $maxLifetimeSeconds = null)
    {
        $creationTimestamp = time();

        if (null === $maxLifetimeSeconds) {
            $expirationTimestamp = null;
        } else {
            $expirationTimestamp = ($creationTimestamp + (int) $maxLifetimeSeconds);
        }

        $entry = new CacheEntry($id, $data, $creationTimestamp, $expirationTimestamp);

        $this->storage->store($entry);

        return $this;
    }
public function store ( $ id , $ data , $ maxLifetimeSeconds = null ) { $ creationTimestamp = time ( ) ; if ( null === $ maxLifetimeSeconds ) { $ expirationTimestamp = null ; } else { $ expirationTimestamp = ( $ creationTimestamp + ( int ) $ maxLifetimeSeconds ) ; } $ entry = new CacheEntry ( $ id , $ data , $ creationTimestamp , $ expirationTimestamp ) ; $ this -> storage -> store ( $ entry ) ; return $ this ; }
Attempts to store provided content into cache. Cache file will hold creation and expiration timestamps,
and provided content.

@param mixed $id Cache item unique identifier (ex: 123).
@param mixed $data Content to be added to cache.
@param null|int $maxLifetimeSeconds (Optional) duration in seconds after which cache file will be
considered expired.
@return CacheClient Fluent return.
@throws \RuntimeException
Attempts to store provided content into cache . Cache file will hold creation and expiration timestamps and provided content .