added cache and parameters support to multi-query