make cache clear optional