Hello Miguel, To clean data in both Memcache and Datastore, you should use the corresponding key. In case of the Memcache, to remove a value from the cache (to evict it immediately), call the remove() method with the key as its argument. To remove every value from the cache for the application, call the clear() method. Related detail may be read on the "Using Memcache" page <https://cloud.google.com/appengine/docs/standard/java/memcache/using#putting_and_getting_values>. In Memcache, you may write your data limiting its persistence: the app can provide an expiration time when a value is stored, as either a number of seconds relative to when the value is added, or as an absolute Unix epoch time in the future. This is documented on the "Memcache Overview" page <https://cloud.google.com/appengine/docs/standard/php/memcache/#how_cached_data_expires> .
Similarly, in case of Datastore, when an entity is no longer needed, you can remove it from Cloud Datastore with the key's delete() method, a statement similar to sandy.key.delete(). The "Creating, Retrieving, Updating, and Deleting Entities" page <https://cloud.google.com/appengine/docs/standard/python/ndb/creating-entities> might offer more insight. In both cases, your code should keep track of the keys, to be able to perform the delete operation. You may use App Engine Cron Service to perform these operations at appropriate times, in accordance with your app's needs. How did you ascertain that Memcache data was persisted to Datastore? When did you first notice it? -- 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 [email protected]. To post to this group, send email to [email protected]. 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/3bc9c839-10b0-4c17-bcaa-5ad39b588493%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
