src/File.php
protected function setTtl($expiration, $contents, $cacheFile)
    {
        switch ($this->ttlStrategy) {
            case 'embed':
                $contents = ($expiration ?? PHP_INT_MAX) . "\n" . $contents;
                break;
            case 'file':
                if (isset($expiration)) {
                    file_put_contents("$cacheFile.ttl", $expiration);
                }
                break;
            case 'mtime':
                // nothing
                break;
        }

        return $contents;
    }
protected function setTtl($expiration, $contents, $cacheFile)
    {
        switch ($this->ttlStrategy) {
            case 'embed':
                $contents = ($expiration ?? PHP_INT_MAX) . "\n" . $contents;
                break;
            case 'file':
                if (isset($expiration)) {
                    file_put_contents("$cacheFile.ttl", $expiration);
                }
                break;
            case 'mtime':
                // nothing
                break;
        }

        return $contents;
    }
protected function setTtl ( $ expiration , $ contents , $ cacheFile ) { switch ( $ this -> ttlStrategy ) { case 'embed' : $ contents = ( $ expiration ?? PHP_INT_MAX ) . "\n" . $ contents ; break ; case 'file' : if ( isset ( $ expiration ) ) { file_put_contents ( "$cacheFile.ttl" , $ expiration ) ; } break ; case 'mtime' : // nothing break ; } return $ contents ; }
Set the TTL using one of the strategies

@param int    $expiration
@param string $contents
@param string $cacheFile
@return string  The (modified) contents
Set the TTL using one of the strategies