code: private function checkCacheDirectory()
      {
          $cachePath = $this->config->get('purifier.cachePath');
  
          if ($cachePath) {
              if (!$this->files->isDirectory($cachePath)) {
                  $this->files->makeDirectory($cachePath, $this->config->get('purifier.cacheFileMode', 0755),true);
              }
          }
      }
docs: Check/Create cache directory