public function getInfo($ip = null)
    {
        if ($ip == null) {
            $ip = $this->getIpAdress();
        }

        $url = str_replace('{IP}', $ip, $this->api_adress);
        $hex = $this->ipToHex($ip);
        $me = $this;

        // Check if the IP is in the cache
        if (Cache::has($hex)) {
            $this->isCached = true;
        }
        // Use the IP info stored in cache or store it
        $ipInfo = Cache::remember($hex, 10080, function () use ($me, $url) {
            return $me->fetchInfo($url);
        });

        $ipInfo->geoplugin_cached = $this->isCached;

        return $ipInfo;
    }