Opened 15 years ago

Closed 15 years ago

#12178 closed (duplicate)

Should be able to manually store non-text in the memcached backend

Reported by: joshuajonah Owned by: nobody
Component: Core (Cache system) Version: dev
Severity: Keywords: gzip
Cc: josh@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I am using a function that stores gzipped content in the memcached backend. The built in memcached cache.get() runs smart_unicode() on the returned text if it is detected as a string. Gzipped content is qualified as str or uncode via "if isinstance(val, basestring):", however there needs to be a way to avoid this in my case.

I've attached a simple diff in the form of an optional kwarg that works for me.

Attachments (1)

raw.diff (703 bytes ) - added by joshuajonah 15 years ago.

Download all attachments as: .zip

Change History (6)

by joshuajonah, 15 years ago

Attachment: raw.diff added

comment:1 by joshuajonah, 15 years ago

Has patch: set

comment:2 by Ramiro Morales, 15 years ago

Isn't this one a duplicate of #11012?

comment:3 by joshuajonah, 15 years ago

Nice find.

Technically yes, but I like the manual override option better. Plus it's a lot simpler.

comment:4 by joshuajonah, 15 years ago

Cc: josh@… added

comment:5 by Russell Keith-Magee, 15 years ago

Resolution: duplicate
Status: newclosed

Dupe of #11012.

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