Posted by litwol on May 19, 2009 at 5:55pm
| Project: | Memcache API and Integration |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
I am using this code in production environment and if i was not the one that rolled this patch i would have set this to RTBC, ala NR it is :).
This patch enables more granular key prefix control on per bin level. I also updated README.txt with example how to use this new feature. Some whitespaces were also stripped from line endings which make this patch a little bigger but overall code cleaner.
cheers.
| Attachment | Size |
|---|---|
| memcached.bin-key-prefix.patch | 6.88 KB |
Comments
#1
One comment still referenced 'memcache_key_prefix' versus the new 'default_key_prefix' string.
#2
To avoid breaking backward compatability, i think i'll change the default key index to 'memcache_key_prefix' and support both array and single prefix setting. that way with next module update absolutely nothing will break.
#3
#4
Attached file features the following:
1) granular control of per-bin key prefixes
2) default key prefix for bins that did not specify own key prefix
3) maintain backward compatability for sites that still use single global prefix
4) updated README.txt to include example of pre-bin prefix
#5
Ive been using this on my sites for a long time now without any problems. I'd appreciate it if this patch would be committed. Thanks.
#6
#966338: Support key prefix by bin was duplicate, also had a more up-to-date patch than here.
There are whitespace changes in litwol's patch that are unrelated to the changes here, also the patch doesn't meet code style:
+ if ( is_array($prefix) ) { //allow for granular memcache key-bin prefixes with default fallbackFor example.
Uploading the patch from the duplicate here, haven't reviewed that one yet so leaving at CNR.
#7
I've updated patch for D7 as well as simplified the default key configuration (removed redundant "memcache_default_key_prefix"). README.txt updated as well.
#8
Uploaded wrong patch (sorries!).
This one also fixes inconsistent urlencoding if key was longer than 250 bytes.
#9
Wow. for reasons unknown chrome on windows urlencoded my patch O_O. here's attempt 2.
#10
subscribe
#11
Opened #1324812: Unify cache bin prefix: proposal to unified convention, I'd really like to see Memcache being well integrated with other cache backends. If my proposal ends up being adopted, you'll need to rewrite this particular patch to fit with.