src/Eager.php
public function persistCacheIfNeeded($lifeTime)
    {
        if ($this->isDirty) {
            $this->storage->doSave($this->storageId, $this->content, $lifeTime);
        }
    }
public function persistCacheIfNeeded($lifeTime)
    {
        if ($this->isDirty) {
            $this->storage->doSave($this->storageId, $this->content, $lifeTime);
        }
    }
Will persist all previously made changes if there were any.

@param int $lifeTime  The cache lifetime in seconds.
If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).