Configurable query cache validation strategy