Andrei, No, this is fundamentally impossible with Memcache. Memcache values are lazily expired at GET time. When you set an expiration on a Memcache item, all you are really doing is telling Memcache to look at that timestamp whenever a read operation takes place, throwing it away if it's past the date.
Memcache is commonly used as a pass-through cache. Store the item in Memcache as well as persistent store. If the item doesn't exist in Memcache when you do a read, read it from the datastore and cache the item. On Mon, Jan 18, 2010 at 7:22 AM, Andrei <[email protected]> wrote: > Are there plans to add notification for expiration? > > On Jan 18, 8:30 am, jd <[email protected]> wrote: > > There is no event mechanism with memcache. You would need to store > > items in memcache and the datastore at the same time. If memcache > > doesn't have it check the datastore. > > > > On Jan 18, 4:44 am, Andrei <[email protected]> wrote: > > > > > Is there a way to code Memcache that would notify when particular > > > entry is about to expire > > > so i can store it in DB? > > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > > > -- Ikai Lan Developer Programs Engineer, Google App Engine--
You received this message because you are subscribed to the Google Groups "Google App Engine for Java" 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-java?hl=en.
