As Memcache is not persistent long-term storage, keys are not expected to live long and can be evicted for reason explained in our documentation <https://cloud.google.com/appengine/docs/python/memcache/#how_cached_data_expires>. As noted <https://cloud.google.com/appengine/docs/python/memcache/#service_levels>, even Dedicated Memcache follows the LRU eviction policy. This means that pushing the limit of your set dedicated Memcache size will begin to evict the oldest keys. You can increase the size of your dedicated Memcache by clicking the 'Change' button in your Console <https://console.cloud.google.com/appengine/memcache> to alleviated this pressure.
Specifically with Dedicated Memcache, it is your app's behavior that will evict its own keys. If you write to the same objects or keys, you will in turn evict the previous item you are overwriting to make room for the new change. The same is also true for deleting keys, as they will also be evicted. Apps that overload their task(s) will end up hurting itself as well. I highly recommend you abide by the Ops/Sec/GB limit shown in your Console <https://console.cloud.google.com/appengine/memcache> for your set Memcache size as explained in our documentation <https://cloud.google.com/appengine/docs/python/memcache/#operations_per_second_by_item_size>. This will ensure that you are optimizing your interactions and operations to make the most out of the space you are allotted. If after performing the above recommendations, you are still seeing this set eviction date of 2 days, I ask that you provide more information about your usage of Memcahce, and your business need to have items stored for 365 days. Providing code samples of your interactions will also help in my investigations. On Friday, October 7, 2016 at 11:30:44 PM UTC-4, Vinay Chitlangia wrote: > > We are using dedicated memcache in our application. Curiously the oldest > cached key time is almost always 1-2 days. > The dedicated quota is 1GB and the cache size never crosses 500MB. > > Entries are made to memcache with 365 days expiration time. > > Wondering if this is expected that the cache will keep purging data on a > 1-2 day scale. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/31cce16b-8b61-4886-bf17-e96424ac200d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.