write clerk caches to file