mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Merge pull request #1624 from woocommerce/PCP-1823-transient-time
Do not use transient expiration longer than month to support memcached
This commit is contained in:
commit
c0058f758f
5 changed files with 7 additions and 7 deletions
|
@ -135,7 +135,7 @@ class BillingAgreementsEndpoint {
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
$this->is_request_logging_enabled = true;
|
$this->is_request_logging_enabled = true;
|
||||||
set_transient( 'ppcp_reference_transaction_enabled', true, 3 * MONTH_IN_SECONDS );
|
set_transient( 'ppcp_reference_transaction_enabled', true, MONTH_IN_SECONDS );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -98,7 +98,7 @@ class PPECHelper {
|
||||||
set_transient(
|
set_transient(
|
||||||
'ppcp_has_ppec_subscriptions',
|
'ppcp_has_ppec_subscriptions',
|
||||||
! empty( $result ) ? 'true' : 'false',
|
! empty( $result ) ? 'true' : 'false',
|
||||||
3 * MONTH_IN_SECONDS
|
MONTH_IN_SECONDS
|
||||||
);
|
);
|
||||||
|
|
||||||
return ! empty( $result );
|
return ! empty( $result );
|
||||||
|
|
|
@ -64,7 +64,7 @@ class OnboardingUrl {
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $cache_ttl = 3 * MONTH_IN_SECONDS;
|
private $cache_ttl = MONTH_IN_SECONDS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The TTL for the previous token cache.
|
* The TTL for the previous token cache.
|
||||||
|
|
|
@ -135,12 +135,12 @@ class DCCProductStatus {
|
||||||
$this->settings->set( 'products_dcc_enabled', true );
|
$this->settings->set( 'products_dcc_enabled', true );
|
||||||
$this->settings->persist();
|
$this->settings->persist();
|
||||||
$this->current_status_cache = true;
|
$this->current_status_cache = true;
|
||||||
$this->cache->set( self::DCC_STATUS_CACHE_KEY, 'true', 3 * MONTH_IN_SECONDS );
|
$this->cache->set( self::DCC_STATUS_CACHE_KEY, 'true', MONTH_IN_SECONDS );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$expiration = 3 * MONTH_IN_SECONDS;
|
$expiration = MONTH_IN_SECONDS;
|
||||||
if ( $this->dcc_applies->for_country_currency() ) {
|
if ( $this->dcc_applies->for_country_currency() ) {
|
||||||
$expiration = 3 * HOUR_IN_SECONDS;
|
$expiration = 3 * HOUR_IN_SECONDS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,11 +127,11 @@ class PayUponInvoiceProductStatus {
|
||||||
$this->settings->set( 'products_pui_enabled', true );
|
$this->settings->set( 'products_pui_enabled', true );
|
||||||
$this->settings->persist();
|
$this->settings->persist();
|
||||||
$this->current_status_cache = true;
|
$this->current_status_cache = true;
|
||||||
$this->cache->set( self::PUI_STATUS_CACHE_KEY, 'true', 3 * MONTH_IN_SECONDS );
|
$this->cache->set( self::PUI_STATUS_CACHE_KEY, 'true', MONTH_IN_SECONDS );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->cache->set( self::PUI_STATUS_CACHE_KEY, 'false', 3 * MONTH_IN_SECONDS );
|
$this->cache->set( self::PUI_STATUS_CACHE_KEY, 'false', MONTH_IN_SECONDS );
|
||||||
|
|
||||||
$this->current_status_cache = false;
|
$this->current_status_cache = false;
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue