perf(batch): reduce memory usage during batch processes

Result sets for batch queries tend to be large and bloat the query cache without being of much use. Since the LRU cache is limited in key size (not memory size), the simplest solution is to flush it during batch operations.