From adcb3a7a274156b85e79bf74d09257393101f431 Mon Sep 17 00:00:00 2001
From: Nick Pope <nick@nickpope.me.uk>
Date: Mon, 5 Apr 2021 00:46:15 +0100
Subject: [PATCH] Removed unused GeoIP2._cache attribute.

Unused since its introduction in 79e68c225b926302ebb29c808dda8afa49856f5c.
---
 django/contrib/gis/geoip2/base.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/django/contrib/gis/geoip2/base.py b/django/contrib/gis/geoip2/base.py
index 7d17766c25..292acc55e6 100644
--- a/django/contrib/gis/geoip2/base.py
+++ b/django/contrib/gis/geoip2/base.py
@@ -68,9 +68,7 @@ class GeoIP2:
             'GeoLite2-City.mmdb'; overrides the GEOIP_CITY setting.
         """
         # Checking the given cache option.
-        if cache in self.cache_options:
-            self._cache = cache
-        else:
+        if cache not in self.cache_options:
             raise GeoIP2Exception('Invalid GeoIP caching option: %s' % cache)
 
         # Getting the GeoIP data path.