[google-appengine] Re: Memcache Usage with Timeouts - Question

2008-12-28 Thread Barry Hunter

the 'time' when you add memcache value can actully be a timestamp.
When you first add calculate 'expire time' then either store in the
value, or in a another memcache item. That way when you replace it you
just read the current expire timestamp, and use it again.



2008/12/28 MajorProgamming sefira...@gmail.com:

 I have an app where I want to set a memcache for 1 hour expiration,
 and then update it while keeping the same timeout (i.e. when I update
 it I don't want the 1-hour to start over, I just want the value to
 change, while keeping the timeout the same as b4). How can I do this?
 




-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

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



[google-appengine] Re: Memcache Usage with Timeouts - Question

2008-12-28 Thread MajorProgamming

Thanks. Nice workaround!

On Dec 28, 4:50 pm, Barry Hunter barrybhun...@googlemail.com
wrote:
 the 'time' when you add memcache value can actully be a timestamp.
 When you first add calculate 'expire time' then either store in the
 value, or in a another memcache item. That way when you replace it you
 just read the current expire timestamp, and use it again.

 2008/12/28 MajorProgamming sefira...@gmail.com:



  I have an app where I want to set a memcache for 1 hour expiration,
  and then update it while keeping the same timeout (i.e. when I update
  it I don't want the 1-hour to start over, I just want the value to
  change, while keeping the timeout the same as b4). How can I do this?

 --
 Barry

 -www.nearby.org.uk-www.geograph.org.uk-
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---