Use separately configurable cache values. Cleanup at uninstall.
Configure (and use, and cleanup) the query timeout and id.