protected function BaseController::determineCachingStrategy in Render cache 7.2
Determines the caching strategy for a given cache info structure.
Parameters
array $cache_info: The cache information structure.
Return value
int One of the RenderCache::RENDER_CACHE_STRATEGY_* constants.
1 call to BaseController::determineCachingStrategy()
- BaseController::getCacheIdInfo in src/
RenderCache/ Controller/ BaseController.php - Provides the fully pouplated cache information for a specific object.
File
- src/
RenderCache/ Controller/ BaseController.php, line 448 - Contains \Drupal\render_cache\RenderCache\Controller\BaseController
Class
- BaseController
- Base class for Controller plugin objects.
Namespace
Drupal\render_cache\RenderCache\ControllerCode
protected function determineCachingStrategy($cache_info) {
if (empty($cache_info['render_cache_render_to_markup'])) {
return RenderCache::RENDER_CACHE_STRATEGY_NO_RENDER;
}
if (!empty($cache_info['render_cache_render_to_markup']['cache late'])) {
return RenderCache::RENDER_CACHE_STRATEGY_LATE_RENDER;
}
return RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER;
}