#21012: Provide shared "caches" dict to avoid creating multiple cache class instances. -------------------------------------+------------------------------------- Reporter: FunkyBob | Owner: aaugustin Type: | Status: assigned Cleanup/optimization | Version: master Component: Core (Cache system) | Resolution: Severity: Normal | Triage Stage: Accepted Keywords: | Needs documentation: 0 Has patch: 1 | Patch needs improvement: 1 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+-------------------------------------
Comment (by apollo13): I just had a quick chat with Ned Batchelder on #python and he suggested to: * Use just one dictionary instead of the three, which seems sensible to me. (eg `self._cache, self._expire_info, self._lock = _cache_info.setdefault(name, ({}, {}, {}))` ) * Use read/lock/read in `__init__` to make clear what the code is doing and not rely on changing (python) implementations -- Ticket URL: <https://code.djangoproject.com/ticket/21012#comment:15> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.0e4296d345890055b4a6a37d78f1d303%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.