Add cache flushing to layers install.