The actual instances are serialized when stored in memcache and deserialized when retrieved from the cache. What you're seeing is a different instance ID (as returned by id(myobj)) since a new object is created. But the state of your Stock.IndexSet instance should be the same before storing in memcache and after fetching it from the cache again.
You should compare the actual data and not the repr() of your instances. Hope that helps :) Andi On Tue, Jul 6, 2010 at 7:42 AM, saintthor <[email protected]> wrote: > it seems there are too entities with same key im my memcache. > > codes: > > self.szz = memcache.get( MemKey ) > if not self.szz: > logging.debug( "no szz in memcache" ) > self.szz = IndexSet( data ) > logging.debug( "dida szz = " + repr( self.szz )) > memcache.set( MemKey, self.szz, 10000 ) > > > log: > > 07-05 10:04PM 41.838 dida szz = <Stock.IndexSet object at > 0xac27dca7f5d540> > 07-05 10:23PM 55.943 dida szz = <Stock.IndexSet object at > 0xcd9724f54f1dbb30> > > > you see, the two szz is defferent, with no log of "no szz in memcache" > between them. > > so i think there may be too entities with same key im my memcache. > > -- > 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. > > -- 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.
