I was looking a bit at the memcache handling and noticed something odd:
all requests were repeated. For example:

<11 get tostyle4you.lib.helpers_image_url_by_id·scale=scale56·id=None
>11 sending key tostyle4you.lib.helpers_image_url_by_id·scale=scale56·id=None
>11 END
<11 get tostyle4you.lib.helpers_image_url_by_id·scale=scale56·id=None
>11 sending key tostyle4you.lib.helpers_image_url_by_id·scale=scale56·id=None
>11 END

I tracked the cause down to the get_value code from the Beaker
container, which looks like this:

222         def get_value(self):
223             self.namespace.acquire_read_lock()
224             try:
225                 has_value = self.has_value()
226  ->             if has_value:
227                     value = self.__get_value()

has_value and __get_value execute the same memcache get command, so a
cache hit always results in two identical queries.

Is there a reason Beaker can't roll has_value and get_value in one call?

Wichert.


-- 
Wichert Akkerman <wich...@wiggy.net>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to