Example #1
0
 /**
  * @param Form $form
  */
 protected function writeToCache(Form $form)
 {
     if ($this->settingsProvider->getIsCacheDisabled()) {
         return;
     }
     $cachePath = $this->getCachePath('');
     if (!file_exists($cachePath)) {
         mkdir($cachePath, 0777, TRUE);
         file_put_contents($this->getCachePath('index.html'), '');
     }
     $file = $this->getCachePath($form->getListId() . '.mc');
     file_put_contents($file, serialize($form));
 }