graceful teardown of cache