When caching is enabled. The cache expiry time can be changed by adding filters. The filters in the table below are the filters that can be used depending on which expiry time needs to be changed.
Default values for all this filters is 12 hours but converted int an equivalent number of seconds using 12 * HOUR_IN_SECONDS (HOUR_IN_SECONDS is a core WordPress constant).
Example Usage: All the filters in the table below provide one integer value you can modify or replace with your own expiry time
<?php
add_action( 'slswc_get_product_details_cache_expiry', function( $expiry_time ) {
$expiry_time = 2 * HOUR_IN_SECONDS; // Change the expiry to 2 hours
// OR
$xpiry_time = $expiry_time * 2;
// return the modified expiry_time
return $expiry_time;
} );
In the example, slswc_get_product_details_cache_expiry
can be replaced with any of the filter names in the left column on the table below depending on what you wish to do.
Filter Name | Description |
slswc_get_license_cache_expiry | Cache expiry for the results a get license query. |
slswc_get_product_details_cache_expiry | Product details cache expiry. |
slswc_check_for_update_cache_expiry | Update chec cache expiry time |
slswc_activate_license_cache_expiry | License activation cache expiry |
slswc_deactivate_license_cache_expiry | License deactivation query cache expiry |
slswc_get_licenses_cache_expiry | Get license results expiry |
slswc_customer_licenses_cache_expiry | Cached customer licenses expiry |
slswc_licenses_where_cache_expiry | Conditional license query expiry |
slswc_total_licenses_cache_expiry | Total licenses expiry |
slswc_total_activations_cache_expiry | Total number of activations expiry. |
slswc_total_live_activations_cache_expiry | Total live activations. |
slswc_total_staging_activations_cache_expiry | Total staging activations. |
slswc_licenses_for_order_cache_expiry | License for order. |
slswc_get_licensed_customer_ids_cache_expiry | Licensed customer ids. |
slswc_get_licensed_customer_details_cache_expiry | Licensed customer details |
slswc_get_expiring_customers_cache_expiry | Expiring customers |
slswc_signup_count_cache_expiry | Number of signups |
slswc_renewal_count_cache_expiry | Number of renewals. |
slswc_get_customers_within_range_cache_expiry | Customers within range |
slswc_get_customers_at_start_cache_expiry | Customers at start of range |
slswc_get_customers_at_end_cache_expiry | Customers at end of range |