code: public function setUseDiskCaching($pValue, $pDirectory = null)
      {
          $this->useDiskCaching = $pValue;
  
          if ($pDirectory !== null) {
              if (is_dir($pDirectory)) {
                  $this->diskCachingDirectory = $pDirectory;
              } else {
                  throw new Exception("Directory does not exist: $pDirectory");
              }
          }
  
          return $this;
      }
docs: Set use disk caching where possible?
  
  @param bool $pValue
  @param string $pDirectory Disk caching directory
  
  @throws Exception when directory does not exist
  
  @return IWriter