Allow to specify when SQL queries should not be cached
|Reported by:||sirzooro||Owned by:||ryan|
Most of SELECT queries executed by WP core or plugins can be safely cached by plugins like DB Cache Reloaded. However there are some which are different every time (e.g. includes current date and time in WHERE clause), return different records every time (e.g. use RAND()), etc. Therefore I suggest to add common way to tell which queries should not be cached.
Attached patch adds new parameter $maybe_cache to all functions of wpdb class, which can be used to execute SELECT query.
2nd patch changes get_calendar() to use this new parameter - it executes two queries with current date/time in WHERE clause.