Compression and caching