Giter Site home page Giter Site logo

Comments (5)

arneb avatar arneb commented on May 31, 2024 1

No, because the point I wanted to make is: "If my project does not use Django's Cache Framework at all, I will never think about changing the CACHES setting and that will break dbtemplates".

If I make any use of Django caching in my project, I will definately use a cache backend thats works for my setup and then dbtemplates will of course work correctly.

The documentation says (https://github.com/jezdez/django-dbtemplates/blob/develop/docs/advanced.txt#L7):

To enable one of them you need to specify a setting called DBTEMPLATES_CACHE_BACKEND ...

And:

Starting in version 1.0 dbtemplates allows you also to set the new dict-based CACHES setting,
which was introduced in Django 1.3.
All you have to do is to provide a new entry in the CACHES dict named 'dbtemplates', e.g.:

What's missing is a clear indication that, If I do nothing, it will use CACHES['default'] and I have to make sure, that it's configured to work for my envirnoment.

After reading the documentation I thought that dbtemplates would only use the cache, if I activated it somehow. But it does it silently by default.
Then Django's default (LocMenCache) combined with my Process-based Django Workers lead to the strange behaviour of seeing outdated templates from some workers.

I opened the ticket because I think it might save others some time if this would be mentioned in the documentation.

from django-dbtemplates.

jezdez avatar jezdez commented on May 31, 2024

Have you tried setting a LOCATION of the locmem backends as described in the Django settings?

from django-dbtemplates.

jezdez avatar jezdez commented on May 31, 2024

Ah, okay, thanks for the clarification, I'm sorry you had to find out that implicit behavior the hard way. This needs to be clarified indeed.

from django-dbtemplates.

mpasternak avatar mpasternak commented on May 31, 2024

@arneb thank you for this problem report, would you mind submitting a pull request against the current docs?

from django-dbtemplates.

guettli avatar guettli commented on May 31, 2024

Maybe this will be solved via PR #131

from django-dbtemplates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.