Webiny\Component\TemplateEngine\Bridge\Smarty\Smarty::getCacheDir PHP Method

getCacheDir() public method

Returns the current cache dir.
public getCacheDir ( ) : string
return string Absolute path to cache dir.
    public function getCacheDir()
    {
        return realpath($this->smarty->getCacheDir());
    }

Usage Example

Example #1
0
 /**
  * @dataProvider dataProvider
  */
 public function testSetGetCacheDir(Smarty $smarty)
 {
     $this->assertSame(__DIR__ . '/Templates/Cache', $smarty->getCacheDir());
     $smarty->setCacheDir('/tmp/new-cache');
     $this->assertSame('/tmp/new-cache', $smarty->getCacheDir());
 }