samedi 27 octobre 2018

Django cached_property decorators vs core.cache

I wonder when @cached_property and django.core.cache(e.g. memcached, redis ...) of Django are used differently.

I think the roles of the two are similar. I have difficulty deciding which one to use.

  1. How do I decide which one to use ?

  2. When considering multiple processes, can '@cached_property' be shared between processes?




Aucun commentaire:

Enregistrer un commentaire