Add caching of queries in a text file.
Merge pull request #4142 from ktf/cache-option

Add caching of queries in a text file.