Open dkrymov opened 7 years ago
Could you add expiry filter when delete transients? As option or as built-in behavior.
$time = isset ( $_SERVER['REQUEST_TIME'] ) ? (int)$_SERVER['REQUEST_TIME'] : time() ; $expired = $wpdb->get_col( "SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE '_transient_timeout%' AND option_value < {$time};" ); foreach( $expired as $transient ) { $key = str_replace('_transient_timeout_', '', $transient); delete_transient($key); }
https://wordpress.stackexchange.com/a/6652
Could you add expiry filter when delete transients? As option or as built-in behavior.
https://wordpress.stackexchange.com/a/6652