SearchWP

This Documentation is for SearchWP Version 3

Available since: 2.9.14

searchwp_dashboard_widget_transient_ttl

View Parameters »

By default SearchWP will use a transient to store Dashboard Widget data so as to improve performance. You can customize the duration of the time to live for this cached data:

<?php
add_filter( 'searchwp_dashboard_widget_transient_ttl', function( $duration ) {
// Only store Dashboard Widget data as transient for 1 hour (instead of default 12).
return HOUR_IN_SECONDS;
} );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$ttl Integer

Number of seconds to cache widget data

[wpforms id="3080"]