6 * HOUR_IN_SECONDS ) ); $expiration = (int) $expiration['cache_ttl']; } return set_transient( $prefix . $key, $data, $expiration ); } public static function delete( $key, $prefix = '__woo_feed_cache_' ) { if ( empty( $key ) ) { return false; } return delete_transient( $prefix . $key ); } /** * Delete All Cached Data * * @return bool */ public static function flush() { global $wpdb; return $wpdb->query( "DELETE FROM $wpdb->options WHERE ({$wpdb->options}.option_name LIKE '_transient_timeout___woo_feed_cache_%') OR ({$wpdb->options}.option_name LIKE '_transient___woo_feed_cache_%')" ); // phpcs:ignore } }