code: protected static function _getFolderToClear($clearFolderPath = '')
      {
          $templateFolderPath = (string) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sCompileDir');
  
          if (!empty($clearFolderPath) and (strpos($clearFolderPath, $templateFolderPath) !== false)) {
              $folderPath = $clearFolderPath;
          } else {
              $folderPath = $templateFolderPath;
          }
  
          return $folderPath;
      }
docs: Check if provided path is inside eShop `tpm/` folder or use the `tmp/` folder path.
  
  @param string $clearFolderPath
  
  @return string