core/modules/block/lib/Drupal/block/BlockBase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index 17ce717..59ea159 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -114,6 +114,7 @@ public function buildConfigurationForm(array $form, array &$form_state) { $form['cache']['max_age'] = array( '#type' => 'select', '#title' => t('Cache: Max age'), + '#description' => t('Choose how long this block may be cached. The default of 0 seconds means it will never be cached.'), '#default_value' => $this->configuration['cache']['max_age'], '#options' => drupal_map_assoc(array(0, 60, 300, 1800, 3600, 21600, 86400, 604800, 2592000, 31536000, 315360000), 'format_interval'), ); @@ -233,7 +234,7 @@ public function isCacheable() { // Similar to the page cache, a block is cacheable if it has a max age. // Blocks that should never be cached can override this method to simply // return FALSE. - return (int)$this->configuration['cache']['max_age'] > 0; + return (bool)$this->configuration['cache']['max_age'] > 0; } }