src/File.php
protected function getTtl(string $cacheFile)
    {
        switch ($this->ttlStrategy) {
            case 'embed':
                return (int)$this->readLine($cacheFile);
            case 'file':
                return file_exists("$cacheFile.ttl")
                    ? (int)file_get_contents("$cacheFile.ttl")
                    : PHP_INT_MAX;
            case 'mtime':
                return $this->getTtl() > 0 ? filemtime($cacheFile) + $this->ttl : PHP_INT_MAX;
        }
    }
protected function getTtl(string $cacheFile)
    {
        switch ($this->ttlStrategy) {
            case 'embed':
                return (int)$this->readLine($cacheFile);
            case 'file':
                return file_exists("$cacheFile.ttl")
                    ? (int)file_get_contents("$cacheFile.ttl")
                    : PHP_INT_MAX;
            case 'mtime':
                return $this->getTtl() > 0 ? filemtime($cacheFile) + $this->ttl : PHP_INT_MAX;
        }
    }
protected function getTtl ( string $ cacheFile ) { switch ( $ this -> ttlStrategy ) { case 'embed' : return ( int ) $ this -> readLine ( $ cacheFile ) ; case 'file' : return file_exists ( "$cacheFile.ttl" ) ? ( int ) file_get_contents ( "$cacheFile.ttl" ) : PHP_INT_MAX ; case 'mtime' : return $ this -> getTtl ( ) > 0 ? filemtime ( $ cacheFile ) + $ this -> ttl : PHP_INT_MAX ; } }
Get the TTL using one of the strategies

@param string $cacheFile
@return int
Get the TTL using one of the strategies