*/
class CRM_Core_BAO_Cache extends CRM_Core_DAO_Cache {
- /**
- * Const the default maximum number of minutes that secure form data should linger
- * @var int
- */
- const SECURE_TIMEOUT = 20;
-
/**
* @var array ($cacheKey => $cacheValue)
*/
public static function cleanup($session = FALSE, $table = FALSE, $prevNext = FALSE) {
// first delete all sessions more than 20 minutes old which are related to any potential transaction
$timeIntervalMins = (int) Civi::settings()->get('secure_cache_timeout_minutes');
- $timeIntervalMins = empty($timeIntervalMins) ? self::SECURE_TIMEOUT : $timeIntervalMins;
if (TRUE) {
$transactionPages = array(
'CRM_Contribute_Controller_Contribution',
'description' => 'CiviCRM will use this setting as path to bootstrap WP.',
'help_text' => NULL,
),
+ 'secure_cache_timeout_minutes' => array(
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'secure_cache_timeout_minutes',
+ 'type' => 'Integer',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'html_attributes' => array(
+ 'size' => 2,
+ 'maxlength' => 8,
+ ),
+ 'default' => 20,
+ 'add' => '4.7',
+ 'title' => 'Secure Cache Timeout',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Maximum number of minutes that secure form data should linger',
+ 'help_text' => NULL,
+ ),
'site_id' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',