FWIW, there are good reasons to ask when memcache fails - I mean a real failure (say, timeout exception) rather than mere lack of data.
For example, if you are put()ing a new value in memcache and you want to make sure the old value is replaced, you really want to be able to retry if the put() fails. In Javaland there is an error handler you can set on MemcacheService - the default is to log and ignore errors but you can set a strict error handler that propagates exceptions. Dunno what the equivalent for Python is. Jeff On Wed, Nov 30, 2011 at 2:03 AM, Brandon Wirtz <[email protected]> wrote: > My socks are not in the drawer. **** > > Return Error (“What has the Maid been doing all day?”**** > > ** ** > > Just because the socks aren’t in the drawer doesn’t mean the drawer is in > error.**** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Tim Hoffman > *Sent:* Tuesday, November 29, 2011 9:39 PM > *To:* [email protected] > *Subject:* [google-appengine] Re: What if I dpn't want memcache to fail > silently?**** > > ** ** > > Hi**** > > ** ** > > Its not generally considered an error if something is not in the cache, > (it is after all a cache, not a guarunteed storage.)**** > > ** ** > > Use a decorator to raise KeyError or whatever you feel is appropriate.**** > > ** ** > > Rgds**** > > ** ** > > Tim**** > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine/-/A3p__F-3o1kJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en.**** > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- I am the 20% -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
