v.23.11Improvement

Setting query_cache_store_results_of_queries_with_nondeterministic_functions Marked Obsolete and Replaced with query_cache_nondeterministic_function_handling

Setting query_cache_store_results_of_queries_with_nondeterministic_functions (with values false or true) was marked obsolete. It was replaced by setting query_cache_nondeterministic_function_handling, a three-valued enum that controls how the query cache handles queries with non-deterministic functions: a) throw an exception (default behavior), b) save the non-deterministic query result regardless, or c) ignore, i.e. don't throw an exception and don't cache the result. #56519 (Robert Schulze).
Replaced the obsolete setting query_cache_store_results_of_queries_with_nondeterministic_functions with a new three-valued enum setting query_cache_nondeterministic_function_handling to control how the query cache processes queries containing non-deterministic functions.

Why it matters

This feature improves flexibility and control over caching behavior for queries with non-deterministic functions, allowing users to choose whether to throw an exception, cache the result regardless, or ignore the caching without exceptions. It addresses the limitation of the previous boolean setting by providing more granular options, enhancing stability and predictability of query caching.

How to use it

Users can configure the new setting query_cache_nondeterministic_function_handling with one of three enum values: throw (default) to raise an exception on such queries, save to cache results of non-deterministic queries anyway, or ignore to silently skip caching without throwing exceptions.