0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00

Used frozenset instead of dict for GeoIP2.cache_options for simplicity.

This commit is contained in:
Sergey Fedoseev 2017-08-23 20:47:47 +05:00 committed by Tim Graham
parent fac74b84a3
commit 4302167939

View File

@ -33,7 +33,7 @@ class GeoIP2:
MODE_FILE = 4
# Load database into memory. Pure Python.
MODE_MEMORY = 8
cache_options = {opt: None for opt in (0, 1, 2, 4, 8)}
cache_options = frozenset((MODE_AUTO, MODE_MMAP_EXT, MODE_MMAP, MODE_FILE, MODE_MEMORY))
# Paths to the city & country binary databases.
_city_file = ''