FluidTYPO3\Fluidcontent\Service\ConfigurationService::writeCachedConfigurationIfMissing PHP Method

writeCachedConfigurationIfMissing() public method

    public function writeCachedConfigurationIfMissing()
    {
        /** @var StringFrontend $cache */
        $cache = $this->manager->getCache('fluidcontent');
        $hasCache = $cache->has('pageTsConfig');
        if (FALSE === $hasCache) {
            $cache->set('pageTsConfig', $this->getPageTsConfig(), array(), 86400);
        }
    }

Usage Example

 /**
  * @param array $items
  * @param NewContentElementController $parentObject
  * @return void
  */
 public function manipulateWizardItems(&$items, &$parentObject)
 {
     $this->configurationService->writeCachedConfigurationIfMissing();
     $items = $this->filterPermittedFluidContentTypesByInsertionPosition($items, $parentObject);
 }