Issue #32 new

Impossible to easy use livesettings without memcached

Hynek Cernoch
created an issue

If the cache backend configuration is "locmem", it works good only with development server. For production with multiprocess deployment it is necessary to use memcached, otherwise old values can be randomly used so long, until the CACHE_TIMEOUT expires. It is very annoying if a change have been saved and shortly other change should be submitted, because the old vaue can remain in the form and be resubmitted back.

The original message has been reported by mistake as a [[https://bitbucket.org/bkroeze/django-livesettings/issue/21/values-are-not-saved-to-the-database-in#comment-847541|comment to different issue #21]].

Comments (2)

  1. drpoovilleorg

    haha; i didn't notice your comment on the previous report before posting my findings... which was exactly what you mention here :) Thanks for the follow up!

  2. Hynek Cernoch reporter

    The problem can be best avoided by installing a very small memcached and setting CACHE_BACKEND to it.

    For infequent one change it can be without memcached acceptable, exactly if it is acceptable to wait after submitting a change at least CACHE_TIMEOUT before testing consequences or before refreshing livesetting form and writing other changes.

    Other options are easier but not optimal at all mor more extensive work with livesetting, namely during server configuration. They all can be very useful in particular situations:
    - Setting CACHE_TIMEOUT temporaty to some short value (e.g. 5 second) and waiting longer than this between pressing form submit and refresh button.
    - Running temporary a development server (maybe with other settings.py) on other port inaccessible public, concurrently with production Django, and connecting browser to this port for work with livesettings and fast testing the consequences.
    - Kill the Django process and start again.

  3. Log in to comment