I would really like to be able to to :
“set $memcached_key_sha1 $request_uri;”
And the then module should lookup using the hashed key instead of
“$memcached_key”.
I guess this would be a minute hack for anyone that has some knowledge
of the inner working of nginx
Jay E. wrote:
I would really like to be able to to :
“set $memcached_key_sha1 $request_uri;”
And the then module should lookup using the hashed key instead of
“$memcached_key”.
I guess this would be a minute hack for anyone that has some knowledge
of the inner working of nginx
Hi Jay,
Unless I’ve missed something, this appears to give no benefit, at a cost
of extra computation.
What were you hoping to achieve?
Regards
Ian
On Fri, Dec 18, 2009 at 12:07 AM, Jay E. [email protected] wrote:
And the then module should lookup using the hashed key instead of
“$memcached_key”.
I guess this would be a minute hack for anyone that has some knowledge of
the inner working of nginx
Oh, it’s been a TODO for my ngx_echo module But I’ve been busy with
bug fixes in the ngx_chunkin module atm
Cheers,
-agentzh
Jay E. wrote:
If i don’t get any response for this i will try to implement it myself
because this cant be really that complicated and i guess that it would
be a neat thing to have in many ways.
A very friendly member of this list has implemented the above and i am
currently testing it and so far it works as it should. I guess he will
announce the module when it is ready for release.
On Sat, Dec 19, 2009 at 3:56 PM, agentzh [email protected] wrote:
Oh, it’s been a TODO for my ngx_echo module But I’ve been busy with
bug fixes in the ngx_chunkin module atm
BTW, “set $memcached_key blah blah” is not a ngx_memcached magic, but
rather ngx_rewrite. I think this feature is general enough to be
included in a separate module. Also, we could get URI escaping and
unescaping routines for any nginx variables like this:
set_uri_unescape $memcached_key $arg_my_key;
as well as
set_sha1 $memcached_key $request_uri
set_md5 $memcached_key $request_uri
in your situation
Well, a module named ngx_escape or ngx_var_filter now comes into my mind
Cheers,
-agentzh