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 7753049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:57:17+00:00 2026-06-01T11:57:17+00:00

i have a simple question in the objectify documentation it says that Only get(),

  • 0

i have a simple question

in the objectify documentation it says that “Only get(), put(), and delete() interact with the cache. query() is not cached”
http://code.google.com/p/objectify-appengine/wiki/IntroductionToObjectify#Global_Cache.

what i’m wondering – if you have one root entity (i did not use @Parent due to all the scalability issues that it seems to have) that all the other entities have a Key to, and you do a query such as

ofy.query(ChildEntity.class).filter("rootEntity", rootEntity).list()

is this completely bypassing the cache?

If this is the case, is there an efficient caching way to do a query on conditions – or for that matter can you cache a query with a parent where you would have to make an actual ancestor query like the following

Key<Parent> rootKey = ObjectifyService.factory().getKey(root)
ofy.query(ChildEntity.class).ancestor(rootKey)

Thank you


as to one of the comments below i’ve added an edit

sample dao (ignore the validate method – it just does some null & quantity checks):

this is a sample find all method inside a delegate called from the DAO that the request factory ServiceLocator is using

public List<EquipmentCheckin> findAll(Subject subject, Objectify ofy, Event event) {
  final Business business = (Business) subject.getSession().getAttribute(BUSINESS_ATTRIBUTE);
  final List<EquipmentCheckin> checkins = ofy.query(EquipmentCheckin.class).filter(BUSINESS_ATTRIBUTE, business)
    .filter(EVENT_CONDITION, event).list();
  return validate(ofy, checkins);
}

now, when this is executed i find that the following method is actually being called in my AbstractDAO.

/**
* 
* @param id
* @return
*/
public T find(Long id) {
  System.out.println("finding " + clazz.getSimpleName() + " id = " + id);
  return ObjectifyService.begin().find(clazz, id);
}
  • 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-01T11:57:19+00:00Added an answer on June 1, 2026 at 11:57 am

    Yes, all queries bypass Objectify’s integrated memcache and fetch results directly from the datastore. The datastore provides the (increasingly sophisticated) query engine that understands how to return results; determining cache invalidation for query results is pretty much impossible from the client side.

    On the other hand, Objectify4 does offer a hybrid query cache whereby queries are automagically converted to a keys-only query followed by a batch get. The keys-only query still requires the datastore, but any entity instances are pulled from (and populate on miss) memcache. It might save you money.

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

Sidebar

Related Questions

I have a simple question, but I'm about 80% sure that the answer to
I have a simple question that I am posing mostly for my curiousity. What
I have simple question. User supplies URL to my PHP script where I fetch
I have simple type Question : public class Question { public string[] Tags {
i have pretty simple simple question (i hope so). How do i change the
I have a simple question concerning Javascript. I am trying to print in a
I have a simple question how do I remove a \ with regex? Thanks
I have a simple question. I am trying to design a simple Android app,
I have a simple question. Should I return a byte-array or simply base64 encode
This is a simple question that can be answered fast by someone who's more

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.