Filter
rpress_reports_cache_ttl
On this page
Filters how long report data is cached, in seconds.
Runs each time the reports screen loads a cached data set. Results are stored in transients whose keys start with rpress_rep_ and depend on the selected filters. Return 0 or a negative number to disable caching.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$ttl | int | Cache lifetime in seconds. Default 120. |
Return value#
int. Lifetime in seconds; 0 or less disables caching.
Example#
function my_reports_cache_ttl( $ttl ) {
return 600;
}
add_filter( 'rpress_reports_cache_ttl', 'my_reports_cache_ttl', 10, 1 );
Source#
Applied in:
includes/admin/reporting/class-rpress-reports-intelligence.php(line 131), inRPRESS_Reports_Intelligence::cached()
Was this page helpful?
