public function setEndpoint($url) { // Remove trailing slash in the url. $url = rtrim($url, '/'); if ($url !== $this->endpoint) { $this->endpoint = $url; $this->clearLocalCaches(); } }