Plugin storage and caching of queries