create autofill_values dict with full_cachekey straight away

This commit is contained in:
Ivan 2025-11-23 23:58:30 +03:00 committed by GitHub
parent 03fe0457ef
commit 34124898cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,8 +53,7 @@ class DatabaseBackend(Backend):
full_cachekey = self.add_prefix(self._autofill_cachekey)
if self._cache.get(full_cachekey):
return
autofill_values = {}
autofill_values[full_cachekey] = 1
autofill_values = {full_cachekey: 1}
for key, value in self.mget(settings.CONFIG):
autofill_values[self.add_prefix(key)] = value
self._cache.set_many(autofill_values, timeout=self._autofill_timeout)