public function getCacheDir() { $context = $this->getContext(); $this->setContext(static::CONTEXT_PREVIEW); $cacheDirectory = parent::getCacheDir(); $this->setContext($context); return $cacheDirectory; }