My website is movies catalog. Once user log in, I show him/her the latest movie added to my database:
movies = Movies.query()
movies = movies.order(-Movies.added)
movie = movies.get(keys_only = True) // get_latest_movie_id
Is it cached (movies are added to the database weekly, so it should be cached)? How to verify that (i.e. what is memcache key)? Yesterday about 1000 users visited my site and I've got
OverQuotaError: The API call datastore_v3.RunQuery() required more quota than is available.
NDB only caches gets by key. I suspect that in your example code
movies
is a query, and NDB doesn't cache queries, you'll need to do that yourself.