Opened 7 years ago

Closed 4 years ago

#8414 closed (fixed)

multiple sites on one memcached

Reported by: urban Owned by: nobody
Component: Core (Cache system) Version: 1.2
Severity: Keywords: cache prefix session cached_db
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:

Description

For every site which use for example CacheMiddleware we need to run new memcached instance, its not efficient with few small sites. I think that adding a key_prefix to the CACHE_BACKEND params will solve this problem. I've attached patch aganist memcache backend.

Attachments (1)

cahche.patch (1.8 KB) - added by urban 7 years ago.

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by urban

comment:1 Changed 7 years ago by toke

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

What about just using CACHE_MIDDLEWARE_KEY_PREFIX?

http://www.djangoproject.com/documentation/settings/#cache-middleware-key-prefix
http://www.djangoproject.com/documentation/cache/#the-per-site-cache

I understand that will exactly solve the issue so I'm closing the ticket.
If that's not the issue feel free to reopen and comment.

comment:2 Changed 7 years ago by urban

  • Resolution invalid deleted
  • Status changed from closed to reopened

It solves some problems, but not all, cache can be also set in other (than the CacheMiddleware) aplications, so maybe reimplement it in the cache framework instead of only in CacheMiddleware?

comment:3 Changed 7 years ago by toke

  • Resolution set to invalid
  • Status changed from reopened to closed

With only this informations the issue is invalid since it describes no bug or new feature.
Describe it clearer maybe with a testcase.

comment:4 Changed 6 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:5 Changed 4 years ago by mordicuac

  • Keywords session cached_db added
  • Needs tests set
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from SVN to 1.2

Using cached_db backend for session sharing memcached with diferent django sites may create session_id conflicts in memcached, using CACHE_MIDDLEWARE_KEY_PREFIX in cache backend solve it.

comment:6 Changed 4 years ago by russellm

  • Resolution set to fixed
  • Status changed from reopened to closed

A site-wide cache prefix was added in [14623]

Note: See TracTickets for help on using tickets.
Back to Top