improved caching persistence and compression