Exemplo n.º 1
0
 /**
  * @return Nette\Caching\ICacheStorage
  */
 public static function getCacheStorage()
 {
     if (self::$cacheStorage === NULL) {
         self::$cacheStorage = new TemplateCacheStorage(Environment::getVariable('tempDir'));
     }
     return self::$cacheStorage;
 }
Exemplo n.º 2
0
	/**
	 * @return Nette\Caching\ICacheStorage
	 */
	public static function getCacheStorage()
	{
		if (self::$cacheStorage === NULL) {
			$dir = Environment::getVariable('tempDir') . '/cache';
			umask(0000);
			@mkdir($dir, 0755); // @ - directory may exists
			self::$cacheStorage = new TemplateCacheStorage($dir);
		}
		return self::$cacheStorage;
	}