You are here

function authcache_form_cache_lifespan in Authenticated User Page Caching (Authcache) 7.2

Returns the ttl for form-cache entries.

@returns int The number of seconds a form should be retained in the cache.

4 calls to authcache_form_cache_lifespan()
AuthcacheFormTestCacheLifespan::testCachedFormBuildID in modules/authcache_form/tests/authcache_form.test
Test functionality for form-build-id.
authcache_form_admin in modules/authcache_form/authcache_form.admin.inc
Form API callback: Generate admin form.
authcache_form_authcache_p13n_fragment in modules/authcache_form/authcache_form.module
Implements hook_authcache_p13n_fragment().
authcache_form_cacheobject_presave in modules/authcache_form/authcache_form.module
Implements hook_cacheobject_presave().
3 string references to 'authcache_form_cache_lifespan'
AuthcacheFormTestCacheLifespan::testCachedFormBuildID in modules/authcache_form/tests/authcache_form.test
Test functionality for form-build-id.
authcache_form_uninstall in modules/authcache_form/authcache_form.install
Implements hook_uninstall().
authcache_form_update_7001 in modules/authcache_form/authcache_form.install
Update form cache lifespan variable.

File

modules/authcache_form/authcache_form.module, line 147
Form token retrieval for Authcache.

Code

function authcache_form_cache_lifespan() {

  // The default ttl for form cache entries is hard-coded to 6 hours in
  // form_set_cache(). Let's extend that to one week if Cache Object API is
  // enabled.
  $default = module_exists('cacheobject') ? 604800 : 21600;
  return (int) variable_get('authcache_form_cache_lifespan', $default);
}