docs: use SOLO_CACHE='default' and warn about LocMemCache (#157) - #160
Open
AquaticAzelf wants to merge 1 commit into
Open
docs: use SOLO_CACHE='default' and warn about LocMemCache (#157)#160AquaticAzelf wants to merge 1 commit into
AquaticAzelf wants to merge 1 commit into
Conversation
Fixes lazybird#157: LocMemCache is per-process, not suitable for production. Change example to shared backend.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #157
Problem:
README.md:245usedSOLO_CACHE = 'local'which maps toLocMemCache. This is per-process (each worker has its own private cache) and is not memory-efficient — see Django docs: Local-memory caching. In multi-process production (gunicorn, uwsgi, etc.) this causes inconsistent singleton caching.Solution: Change example to shared backend
SOLO_CACHE = 'default'(Memcached) and add warning block:Keep existing
Caching will be disabled if set to None.sentence.Verification (folder-local only, no global installs):
python -m venv .venvinside cloneC:\Users\Azelf\AppData\Local\Temp\opencode\django-solo-fix,pip install -e .(installed django-solo 2.5.1, Django 6.1)grep -n SOLO_CACHE README.mdbefore:245: SOLO_CACHE = 'local'; after:245: SOLO_CACHE = 'default'plus warning line 248python manage.py test solo --settings=solo.tests.settings— 13 tests OK (exit 0)git diffshows 1 file changed, 3 insertions(+), 1 deletion(-)Files:
README.mdonly.