Consistent client-side cache
First Claim
1. A computer implemented method for caching query results in a client-side cache, comprising:
- identifying data stored on a database at a database server, the data comprising a first table and a second table, wherein a change in the second table executes a trigger that automatically modifies at least a portion of the first table that corresponds to the change in the second table;
maintaining the query results at the client-side cache for a query, wherein the query results correspond to the first table and the second table stored on the database at the database server;
sending, by using a processor, a database server request to the database server from a client, wherein the database server request is directed to a change in the second table stored on the database, the change in the second table executing the trigger that automatically modifies at least the portion of the first table to correspond to the change in the second table;
receiving query results from the database server from processing the database server request, in which the database server also sends information pertaining to whether the query results cached at the client-side cache are invalid, wherein determining whether the query results are invalid comprises;
(a) accessing a set of query registrations, a query registration from among the set of query registrations comprising a query identification along with identification of one or more database objects corresponding to the query identification, wherein first snapshot data is associated with the one or more database objects corresponding to the query identification, (b) comparing the first snapshot data with second snapshot data, the second snapshot data associated with a latest version of the one or more objects registered for the query identification; and
(c) sending a response back to the client to invalidate the query results if comparison of the first snapshot data with the second snapshot data indicates a change to any of the one or more objects corresponding to the query identification that is specified to cause an invalidation of the query results for the query identification;
wherein the query results were registered based upon a determination that the query should be cached by;
(a) analyzing the query based at least on one or more of a size of a result of the query, whether a result of the query relies on data from read only or mostly read tables, a frequency expectation for a repeat of the query, a frequency expectation for a change in the query results, a constraint specified by the client, or an amount of computing expenses required to compute the query results; and
(b) registering the query result at the server if it is determined that the query should be cached; and
storing the information in a non-transitory computer-usable medium or displaying the information on a display device.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, system, and computer program product is disclosed for caching results in a client-side cache. Embodiments of a method, a system, and a computer program product are disclosed that associate a first snapshot of a database with a client that indicates a state of the database after a last database request by the client, and indicate any number of invalid cached results in the client cache for the client based upon the first snapshot. In some embodiments, the method further includes receiving a second snapshot that indicates a state of the database upon receipt of a database server request by the client, and updating the first snapshot with the second snapshot.
60 Citations
34 Claims
-
1. A computer implemented method for caching query results in a client-side cache, comprising:
-
identifying data stored on a database at a database server, the data comprising a first table and a second table, wherein a change in the second table executes a trigger that automatically modifies at least a portion of the first table that corresponds to the change in the second table; maintaining the query results at the client-side cache for a query, wherein the query results correspond to the first table and the second table stored on the database at the database server; sending, by using a processor, a database server request to the database server from a client, wherein the database server request is directed to a change in the second table stored on the database, the change in the second table executing the trigger that automatically modifies at least the portion of the first table to correspond to the change in the second table; receiving query results from the database server from processing the database server request, in which the database server also sends information pertaining to whether the query results cached at the client-side cache are invalid, wherein determining whether the query results are invalid comprises;
(a) accessing a set of query registrations, a query registration from among the set of query registrations comprising a query identification along with identification of one or more database objects corresponding to the query identification, wherein first snapshot data is associated with the one or more database objects corresponding to the query identification, (b) comparing the first snapshot data with second snapshot data, the second snapshot data associated with a latest version of the one or more objects registered for the query identification; and
(c) sending a response back to the client to invalidate the query results if comparison of the first snapshot data with the second snapshot data indicates a change to any of the one or more objects corresponding to the query identification that is specified to cause an invalidation of the query results for the query identification;wherein the query results were registered based upon a determination that the query should be cached by;
(a) analyzing the query based at least on one or more of a size of a result of the query, whether a result of the query relies on data from read only or mostly read tables, a frequency expectation for a repeat of the query, a frequency expectation for a change in the query results, a constraint specified by the client, or an amount of computing expenses required to compute the query results; and
(b) registering the query result at the server if it is determined that the query should be cached; andstoring the information in a non-transitory computer-usable medium or displaying the information on a display device. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A computer program product comprising a non-transitory computer usable medium having executable code to execute, by using a processor, a process for implementing a client cache in a computing system, the process comprising:
-
identifying data stored on a database at a database server, the data comprising a first table and a second table, wherein a change in the second table executes a trigger that automatically modifies at least a portion of the first table that corresponds to the change in the second table; maintaining query results at a client-side cache for a query, wherein the query results correspond to the first table and the second table stored on the database at the database server; sending, by using a processor, a database server request to the database server from a client, wherein the database server request is directed to a change in the second table stored on the database the change in the second table executing the trigger that automatically modifies at least the portion of the first table to correspond to the change in the second table; receiving the query results from the database server from processing the database server request, in which the database server also sends information pertaining to whether the query results cached at the client-side cache are invalid, wherein determining whether the query results are invalid comprises;
(a) accessing a set of query registrations, a query registration from among the set of query registrations comprising a query identification along with identification of one or more database objects corresponding to the query identification, wherein first snapshot data is associated with the one or more database objects corresponding to the query identification, (b) comparing the first snapshot data with second snapshot data, the second snapshot data associated with a latest version of the one or more objects registered for the query identification; and
(c) sending a response back to the client to invalidate the query results if comparison of the first snapshot data with the second snapshot data indicates a change to any of the one or more objects corresponding to the query identification that is specified to cause an invalidation of the query results for the query identification;wherein the query results were registered based upon a determination that the query should be cached by;
(a) analyzing the query based at least on one or more of a size of a result of the query, whether a result of the query relies on data from read only or mostly read tables, a frequency expectation for a repeat of the query, a frequency expectation for a change in the query results, a constraint specified by the client, or an amount of computing expenses required to compute the query results; and
(b) registering the query result at the server if it is determined that the query should be cached; andstoring the information in a non-transitory computer-usable medium or displaying the information on a display device. - View Dependent Claims (17, 18, 19, 20)
-
-
21. A computer system for caching query results in a client-side cache comprising:
-
a processor programmed for; identifying data stored on a database at a database server, the data comprising a first table and a second table, wherein a change in the second table executes a trigger that automatically modifies at least a portion of the first table that corresponds to the change in the second table; maintaining the query results at the client-side cache for a query, wherein the query results correspond to the first table and the second table stored on the database at the database server; sending, by using a processor, a database server request to the database server from a client, wherein the database server request is directed to a change in the second table stored on the database the change in the second table executing the trigger that automatically modifies at least the portion of the first table to correspond to the change in the second table; receiving the query results from the database server from processing the database server request, in which the database server also sends information pertaining to whether the query results cached at the client-side cache are invalid, wherein determining whether the query results are invalid comprises;
(a) accessing a set of query registrations, a query registration from among the set of query registrations comprising a query identification along with identification of one or more database objects corresponding to the query identification, wherein first snapshot data is associated with the one or more database objects corresponding to the query identification, (b) comparing the first snapshot data with second snapshot data, the second snapshot data associated with a latest version of the one or more objects registered for the query identification; and
(c) sending a response back to the client to invalidate the query results if comparison of the first snapshot data with the second snapshot data indicates a change to any of the one or more objects corresponding to the query identification that is specified to cause an invalidation of the query results for the query identification;wherein the query results were registered based upon a determination that the query should be cached by;
(a) analyzing the query based at least on one or more of a size of a result of the query, whether a result of the query relies on data from read only or mostly read tables, a frequency expectation for a repeat of the query, a frequency expectation for a change in the query results, a constraint specified by the client, or an amount of computing expenses required to compute the query results; and
(b) registering the query result at the server if it is determined that the query should be cached; andstoring the information in a non-transitory computer-usable medium for storing the information or displaying the information on a display device. - View Dependent Claims (22, 23, 24, 25)
-
-
26. A method for caching query results of a query in a client-side cache, comprising:
-
identifying data stored on a database at a database server, the data comprising a first table and a second table, wherein a change in the second table executes a trigger that automatically modifies at least a portion of the first table that corresponds to the change in the second table; maintaining the query results at the client-side cache for a query, wherein the query results correspond to the first table and the second table stored on the database at the database server; receiving, at the database server, a database server request from a client, wherein the database server request is directed to a change in the second table stored on the database, the change in the second table executing the trigger that automatically modifies at least the portion of the first table to correspond to the change in the second table; processing, by using a processor, the database server request; sending, from the database server, in response to the database server request, query results from the processing the database server request, and information pertaining to whether the query results cached at the client-side cache are invalid, wherein determining whether the query results are invalid comprises;
(a) accessing a set of query registrations, a query registration from among the set of query registrations comprising a query identification along with identification of one or more database objects corresponding to the query identification, wherein first snapshot data is associated with the one or more database objects corresponding to the query identification, (b) comparing the first snapshot data with second snapshot data, the second snapshot data associated with a latest version of the one or more objects registered for the query identification; and
(c) sending a response back to the client to invalidate the query results if comparison of the first snapshot data with the second snapshot data indicates a change to any of the one or more objects corresponding to the query identification that is specified to cause an invalidation of the query results for the query identification;wherein the query results were registered based upon a determination that the query should be cached by;
(a) analyzing the query based at least on one or more of a size of a result of the query, whether a result of the query relies on data from read only or mostly read tables, a frequency expectation for a repeat of the query, a frequency expectation for a change in the query results, a constraint specified by the client, or an amount of computing expenses required to compute the query results; and
(b) registering the query result at the server if it is determined that the query should be cached; andstoring the results in a non-transitory computer-usable medium or displaying the information on a display device. - View Dependent Claims (27, 28)
-
-
29. A system for caching query results in a client-side cache, comprising:
-
a processor programmed for; identifying data stored on a database at a database server, the data comprising a first table and a second table, wherein a change in the second table executes a trigger that automatically modifies at least a portion of the first table that corresponds to the change in the second table; maintaining the query results at the client-side cache for a query, wherein the query results correspond to the first table and the second table stored on the database at the database server; receiving, at the database server, a database server request from a client, wherein the database server request is directed to a change in the second table stored on the database, the change in the second table executing the trigger that automatically modifies at least the portion of the first table to correspond to the change in the second table; processing, by using a processor, the database server request; sending, from the database server, in response to the database server request, query results from the processing the database server request, and information pertaining to whether the query results cached at the client-side cache are invalid, wherein determining whether the query results are invalid comprises;
(a) accessing a set of query registrations, a query registration from among the set of query registrations comprising a query identification along with identification of one or more database objects corresponding to the query identification, wherein first snapshot data is associated with the one or more database objects corresponding to the query identification, (b) comparing the first snapshot data with second snapshot data, the second snapshot data associated with a latest version of the one or more objects registered for the query identification; and
(c) sending a response back to the client to invalidate the query results if comparison of the first snapshot data with the second snapshot data indicates a change to any of the one or more objects corresponding to the query identification that is specified to cause an invalidation of the query results for the query identification;wherein the query results were registered based upon a determination that the query should be cached by;
(a) analyzing the query based at least on one or more of a size of a result of the query, whether a result of the query relies on data from read only or mostly read tables, a frequency expectation for a repeat of the query, a frequency expectation for a change in the query results, a constraint specified by the client, or an amount of computing expenses required to compute the query results; and
(b) registering the query result at the server if it is determined that the query should be cached; andstoring the information in a non-transitory computer-usable medium for storing the results or displaying the information on a display device. - View Dependent Claims (30, 31)
-
-
32. A computer program product comprising a non-transitory computer usable medium having executable code to execute, by using a processor, a process for caching query results in a client-side cache in a computing system, the process comprising:
-
identifying data stored on a database at a database server, the data comprising a first table and a second table, wherein a change in the second table executes a trigger that automatically modifies at least a portion of the first table that corresponds to the change in the second table; maintaining the query results at the client-side cache for a query, wherein the query results correspond to the first table and the second table stored on the database at the database server; receiving, at the database server, a database server request from a client, wherein the database server request is directed to a change in the second table stored on the database, the change in the second table executing the trigger that automatically modifies at least the portion of the first table to correspond to the change in the second table; processing, by using a processor, the database server request; sending, from the database server, in response to the database server request, query results from the processing the database server request, and information pertaining to whether the query results cached at the client-side cache are invalid, wherein determining whether the query results are invalid comprises;
(a) accessing a set of query registrations, a query registration from among the set of query registrations comprising a query identification along with identification of one or more database objects corresponding to the query identification, wherein first snapshot data is associated with the one or more database objects corresponding to the query identification, (b) comparing the first snapshot data with second snapshot data, the second snapshot data associated with a latest version of the one or more objects registered for the query identification; and
(c) sending a response back to the client to invalidate the query results if comparison of the first snapshot data with the second snapshot data indicates a change to any of the one or more objects corresponding to the query identification that is specified to cause an invalidation of the query results for the query identification;wherein the query results were registered based upon a determination that the query should be cached by;
(a) analyzing the query based at least on one or more of a size of a result of the query, whether a result of the query relies on data from read only or mostly read tables, a frequency expectation for a repeat of the query, a frequency expectation for a change in the query results, a constraint specified by the client, or an amount of computing expenses required to compute the query results; and
(b) registering the query result at the server if it is determined that the query should be cached; andstoring the results in a non-transitory computer-usable medium or displaying the information on a display device. - View Dependent Claims (33, 34)
-
Specification