cache invalidation - going back to flush_cache in write_file