Skip to content

Commit 5811bf9

Browse files
committed
functools.cache is Python>=3.9
1 parent bdcfa22 commit 5811bf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

feincms3_data/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io
22
import json
33
from collections import defaultdict
4-
from functools import cache
4+
from functools import lru_cache
55
from itertools import chain
66

77
from django.apps import apps
@@ -144,7 +144,7 @@ def load_dump(data, *, progress=silence, ignorenonexistent=False):
144144

145145

146146
def pk_cache():
147-
@cache
147+
@lru_cache(maxsize=None)
148148
def pks(model):
149149
return set(model._default_manager.values_list("pk", flat=True))
150150

0 commit comments

Comments
 (0)