#27641: Document limitations of the Locmem cache backend
-------------------------------------+-------------------------------------
     Reporter:  Adam Chainz          |                    Owner:  Adam
         Type:                       |  Chainz
  Cleanup/optimization               |                   Status:  assigned
    Component:  Documentation        |                  Version:  1.10
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Adam Chainz):

 considering the contract of Django cache backends -- keys can be evicted
 arbitrarily

 The contract of `cache.delete()` though is that the value is gone, but it
 can't be with per-process caches - that's the main confusion I'm worried
 about.

 Actually thanks for linking Tim, the docs do already say quite a lot. The
 last paragraph makes it obvious that it's probably not suitable:

    Note that each process will have its own private cache instance, which
 means no cross-process caching is possible. This obviously also means the
 local memory cache isn’t particularly memory-efficient, so it’s probably
 not a good choice for production environments. It’s nice for development.

 My main concern is for projects that don't realize they're using caching
 and thus don't read the caching docs, that's why I suggested a deploy
 check since it's unavoidable. I think it would be best to include a bit
 more under the the
 [https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/#caches
 `CACHES` section in the deployment checklist], and also a sentence about
 the low default size on the caching page.

--
Ticket URL: <https://code.djangoproject.com/ticket/27641#comment:6>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.4eb3df27cac381628a99977e7803ed33%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to