On Mon, 10 Aug 2009, David Sheldon wrote: > Can you explain what you want to use the key check for? I can't see > any use for a key check, as it may expire between checking for the > key, and whatever you want to do with the key, and produce a race > condition.
As explained on IRC I have a webserver[1] that when matching incoming requests splits the 'match' and the 'serve' in two. So now I have created a rule check that checks for presence and a content part that serves the content. There is *no* relation between rule and content. The use case scenario is is a fcgi program writing to memcache filling a key, and the next time instead of going to the fcgi program memcached returns "i've got it" and serve it. This is already working; I just want to know if I can save the string allocation (and the direct free after it) at the check phase. You might wonder 'what happens if you just go into the memcache if it isn't there?' basically I cannot go back into the rule list. So if the key check actually returns the expiry value that would be superb, since then I could even generate an ETag. Stefan [1] http://www.cherokee-project.com/
