20. The method according to claim 15 , further comprising at least one of: retrieving the query result for a query in the cache by its key; selecting a query and removing its result from the cache; and invalidating the query result for a query in the cache.
15. A method to provide query caching, comprising: deploying a query component in a container, running on the one or more microprocessors; issuing, via a cache management component running on the one or more microprocessors, a query to retrieve a query result from a database, wherein the query is associated with a transaction, and wherein the query result includes one or more instances of a class that is managed by the container, wherein the class represents one or more persisted data entries retrieved from the database and the one or more persisted data entries are associated with at least one row in a table in the database; storing, via the cache management component, the one or more instances of the class in a cache; maintaining, via a query registration component running on the one or more microprocessors, the query in a query registry with one or more queries; looking up, via the cache management component, the query in the query registry; retrieving, via the cache management component, the stored one or more instances of the class for the query in the cache when another query matches the query in the query registry; allowing the one or more instances of the class to be used concurrently by multiple users using an optimistic concurrency strategy, and wherein, under the optimistic concurrency strategy, the cache management component leaves the one or more instances of the class in the cached query result unlocked when the one or more instances of the class remain unchanged during the transaction; invalidating the one or more instances of the class in the cached query result that are used concurrently by multiple users during the transaction, when a row in the table in the database that is not used by the cached query result is updated or invalidated; and removing the query from the query registry and removing the cached query result with the one or more instances of the class from the cache.