better_search_query_cache_time
Filter the cache time which allows a function to override this
Type: filter
Since: 3.0.0
Source: includes/class-better-search-core-query.php line 1549
Changelog
| Version | Description |
|---|---|
4.2.0 |
Added $instance parameter. |
3.0.0 |
Introduced. |
Parameters
| Type | Name | Description |
|---|---|---|
int |
$cache_time |
Cache time in seconds |
array |
$args |
Array of all the arguments |
\WP_Query |
$query |
The WP_Query instance (passed by reference). |
Better_Search_Core_Query |
$instance |
The Better_Search instance (passed by reference). |
Usage
add_filter( 'better_search_query_cache_time', function($cache_time, $args, $query, $instance) {
// ...
return $cache_time;
} );