Performance fixes: cache, gzip.

* This commit closes #24,
* This commit closes #19.