You are here

function authcache_element_suspect in Authenticated User Page Caching (Authcache) 7.2

Specify that the given element cannot be cached without further processing.

Related topics

6 calls to authcache_element_suspect()
AuthcacheElementCacheabilityAPITestCase::testElementCacheabilityAPI in ./authcache.test
Test cacheability API for render elements.
authcache_form_alter in ./authcache.module
Implements hook_form_alter().
authcache_form_comment_form_alter in ./authcache.module
Implements hook_form_BASE_FORM_ID_alter().
authcache_form_value_suspect in ./authcache.module
Recursively find elements of type value and flag them as suspicous.
authcache_preprocess_page in ./authcache.module
Implements hook_preprocess_page().

... See full list

File

./authcache.module, line 445
Authenticated User Page Caching (and anonymous users, too!)

Code

function authcache_element_suspect(&$element, $message = NULL, $strict = FALSE) {
  $element['#post_render'][] = 'authcache_ensure_element_cacheable';
  if ($message) {
    $element['#authcache_cancel_message'] = $message;
  }
  if ($strict || isset($element['#type']) && $element['#type'] === 'value') {
    $element['#authcache_cancel_strict'] = TRUE;
  }
}