Create public function to check if cache needs update

move update cache check to public function