Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8430655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:38:51+00:00 2026-06-10T05:38:51+00:00

Could not find this specific question asked before yet. How does App Engine’s NDB

  • 0

Could not find this specific question asked before yet. How does App Engine’s NDB handle caching when using projected queries vs. full entity queries?

For example, if I do a projected query first..

MyModel.query().get(projected=['name'])

…and then do a regular query next…

MyModel.query().get()

…what will I get? The full entity? If so, was ANY part of first query automatically cached by NDB? Or is NDB able to make the distinction well, so the next time I run the projected query it is potentially pulled from cache?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:38:52+00:00Added an answer on June 10, 2026 at 5:38 am

    As far as I’m aware, query results are only cached in in-context cache, but results are not fetched from cache for queries.

    key.get() will be cached and retrieved from cache, but query.get() won’t be retrieved from cache.

    https://developers.google.com/appengine/docs/python/ndb/cache

    From the docs:
    Queries do not look up values in any cache. However, query results are written back to the in-context cache if the cache policy says so (but never to Memcache).

    To answer the question regarding what you’ll be getting, in both queries it appears that the results will be fetched from the datastore and not from cache.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If this has been asked before please forgive me, I could not find it.
This seems pretty a straight-forward question, but I could not find a specific answer
I could not find a clear answer to this question elsewhere, so I'll try
This should be a common scenario, but could not find any relevant post yet..
My apologies if this was answered in another question, I could not find an
This question was previously asked Here , but not answered, And failed to find
I'm sorry if this question has been asked before, but I'm not even sure
I could not find the exact question answered on this site. The html on
Could not find an answer on this question, so would like to initiate this:
I have searched but could not find the reason for this behavior. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.