fixed live query and json (gzip) caching for py3