public function getTempDirectory()
    {
        if (! is_null($this->configuration->getTempDirectory())) {
            return $this->configuration->getTempDirectory();

        }

        if (is_null($this->cachedTempDirectory)) {
            $this->cachedTempDirectory = $this->findTempDirectory();

        }
        return $this->cachedTempDirectory;
    }