add api cache cleaup and httpd stopping during cleanup