public function getCachedTemplate(Dwoo $dwoo)
	{
		if ($this->cacheTime !== null) {
			$cacheLength = $this->cacheTime;
		} else {
			$cacheLength = $dwoo->getCacheTime();
		}

		// file is not cacheable
		if ($cacheLength === 0) {
			return false;
		}

		$cachedFile = $this->getCacheFilename($dwoo);

		if (isset(self::$cache['cached'][$this->cacheId]) === true && file_exists($cachedFile)) {
			// already checked, return cache file
			return $cachedFile;
		} elseif ($this->compilationEnforced !== true && file_exists($cachedFile) && ($cacheLength === -1 || filemtime($cachedFile) > ($_SERVER['REQUEST_TIME'] - $cacheLength)) && $this->isValidCompiledFile($this->getCompiledFilename($dwoo))) {
			// cache is still valid and can be loaded
			self::$cache['cached'][$this->cacheId] = true;
			return $cachedFile;
		} else {
			// file is cacheable
			return true;
		}
	}