Code

Opened 6 years ago

Closed 3 years ago

#7399 closed New feature (wontfix)

Allow Google's AppEngine Memcache library.

Reported by: blinks 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 blinks 6 years ago.
A patch that adds Google's memcache library to the memcached module.

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by blinks

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

comment:1 Changed 6 years ago by jacob

  • Has patch set
  • Needs documentation set
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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

comment:2 follow-up: Changed 6 years ago by anonymous

  • Triage Stage changed from Accepted to Design 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 ; follow-up: Changed 6 years ago by blinks

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 6 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 6 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 3 years ago by lukeplant

  • Severity set to Normal
  • Type set to New feature

comment:7 Changed 3 years ago by jezdez

  • Easy pickings unset
  • Resolution set to wontfix
  • Status changed from new to closed
  • 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)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.