multiple modes (gzip, json) + cache flushing