Opened 8 years ago

Closed 5 years ago

#7399 closed New feature (wontfix)

Allow Google's AppEngine Memcache library.

Reported by: Adam Blinkinsop Owned by: nobody
Component: Core (Cache system) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Google's AppEngine contains a modification of the Memcache library that is functionally compatible.

Several changes would make it easy to drop this into the existing cache system. One possibility is adding it to the try/except block at the top of [source:trunk/django/core/cache/backends/memcached.py django.core.cache.backends.memcached]. There could also be a setting that determines which library to use (like the TEMPLATE_LOADERS or MIDDLEWARE_CLASSES settings). Which is more Django-friendly?

Even if this doesn't need to be in trunk, I think that it would be useful to have an easy way to add a new memcache interface, and it seems like a violation of DRY to create a new backends module for something so compatible. Thoughts?

Attachments (1)

memcache.patch (711 bytes) - added by Adam Blinkinsop 8 years ago.
A patch that adds Google's memcache library to the memcached module.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by Adam Blinkinsop

Attachment: memcache.patch added

A patch that adds Google's memcache library to the memcached module.

comment:1 Changed 8 years ago by Jacob

Has patch: set
Needs documentation: set
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

Needs a mention in the caching docs, but otherwise sounds like a fine idea.

comment:2 Changed 8 years ago by anonymous

Triage Stage: AcceptedDesign decision needed

This trick is too implicit and unintuitive. Specifying Google memcached explicit is more pythonic. I think #7398 is better way to implement this.

comment:3 in reply to:  2 ; Changed 8 years ago by Adam Blinkinsop

Replying to anonymous:

This trick is too implicit and unintuitive. Specifying Google memcached explicit is more pythonic. I think #7398 is better way to implement this.

I agree; how do we influence the design of #7398 so that we can use the existing backend with the new google.appengine.api.memcache module?

comment:4 in reply to:  3 Changed 8 years ago by anonymous

Replying to blinks:

I agree; how do we influence the design of #7398 so that we can use the existing backend with the new google.appengine.api.memcache module?

You can ask this on the developers list or on the irc channel as ticket system is the wrong place for discussions.

comment:5 Changed 8 years ago by theillustratedlife

I have posted a modified version of memcache.py that, in correlation with #7398, explicitly uses Google's memcache as the cache backend.

comment:6 Changed 5 years ago by Luke Plant

Severity: Normal
Type: New feature

comment:7 Changed 5 years ago by Jannis Leidel

Easy pickings: unset
Resolution: wontfix
Status: newclosed
UI/UX: unset

Closing as wontfix since nowadays it's rather easy to subclass BaseMemcachedCache that was added in r15005
(source:django/trunk/django/core/cache/backends/memcached.py?rev=16001#L9) similar the default Memcache class (source:django/trunk/django/core/cache/backends/memcached.py?rev=16001#L146)

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