1. A method in a data processing system for a context based infrastructure to enable subset query over a cached object, the method comprising: detecting a query to a root context of a context tree from a user, wherein the query includes a name and value pair; responsive to detecting the query, traversing the context tree for a parent context of a subcontext corresponding to the name and value pair; and determining if the parent context caches all query results.