System and Method for Maintaining Cache Coherency
First Claim
1. In a computing system having a cache memory and a storage device, a cache coherency method comprising:
- intercepting, by a cache manager running on the computing system, a read request from an application running on the computing system;
determining, by the cache manager from the intercepted read request, an identifier for a required object and a required generation number; and
determining by the cache manager;
if the required object is not stored in the cache memory, then storing in the cache memory a copy of the required object retrieved from the storage device, adding metadata regarding the stored object to the cache database, the stored object metadata comprising an object generation number equal to the application generation number, adding a reference to the stored object to a list of references to object stored in the cache memory that are being used by the application, and returning the copy of the object to the application,elseif the required object is stored in the cache memory, and the stored object is of a generation number that is not less than the required generation number, then adding a reference to the stored object to the list of references to objects stored in the cache memory that are being used by the application, and returning the stored object from the cache memory to the application,elseif the required object is stored in the cache memory, and the stored object is of a generation number that is less than the required generation number, then storing in the cache memory a copy of the required object retrieved from the storage device, adding metadata regarding the stored object to the cache database, the stored object metadata comprising an object generation number equal to the application generation number, adding a reference to the stored object to a list of references to objects stored in the cache memory that are being used by the application, and returning the copy of the object to the application.
1 Assignment
0 Petitions
Accused Products
Abstract
A cache manager maintains coherency of cached objects used by applications in a computing system. The cache manager maintains a cache memory of objects as they are accessed by an application. The cache manager tracks cached objects on a per-application basis using a cache database, storing for each object metadata comprising the generation number of the application using the cached object, and the file generation number of the file from which the object was read. The cache manager determines whether cached objects are valid and can be used by the application, or are stale and must be reloaded, by using these generation numbers when an application attempts to use a file or object. In this fashion, cache coherency is maintained even in a distributed environment without the centralized cache management bottlenecks of prior approaches and without the need to eagerly purge the cache of stale versions of objects.
25 Citations
21 Claims
-
1. In a computing system having a cache memory and a storage device, a cache coherency method comprising:
-
intercepting, by a cache manager running on the computing system, a read request from an application running on the computing system; determining, by the cache manager from the intercepted read request, an identifier for a required object and a required generation number; and determining by the cache manager; if the required object is not stored in the cache memory, then storing in the cache memory a copy of the required object retrieved from the storage device, adding metadata regarding the stored object to the cache database, the stored object metadata comprising an object generation number equal to the application generation number, adding a reference to the stored object to a list of references to object stored in the cache memory that are being used by the application, and returning the copy of the object to the application, else if the required object is stored in the cache memory, and the stored object is of a generation number that is not less than the required generation number, then adding a reference to the stored object to the list of references to objects stored in the cache memory that are being used by the application, and returning the stored object from the cache memory to the application, else if the required object is stored in the cache memory, and the stored object is of a generation number that is less than the required generation number, then storing in the cache memory a copy of the required object retrieved from the storage device, adding metadata regarding the stored object to the cache database, the stored object metadata comprising an object generation number equal to the application generation number, adding a reference to the stored object to a list of references to objects stored in the cache memory that are being used by the application, and returning the copy of the object to the application. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system for maintaining cache coherency in a computing system comprising:
-
a cache memory; a cache database; a storage device; and a cache manager running on the computing system, the cache manager configured to; intercept a read request from an application running on the computing system; determine from the intercepted read request an identifier for a required object and a required generation number; and determine; if the required object is not stored in the cache memory, then store in the cache memory a copy of the required object retrieved from the storage device, add metadata regarding the stored object to the cache database, the stored object metadata comprising an object generation number equal to the application generation number, add a reference to the stored object to a list of references to objects stored in the cache memory that are being used by the application, and return the copy of the object to the application, else if the required object is stored in the cache memory, and the stored object is of a generation number that is not less than the required generation number, then add a reference to the stored object to the list of references to objects stored in the cache memory that are being used by the application, and return the stored object from the cache memory to the application, else if the required object is stored in the cache memory, and the stored object is of a generation number that is less than the required generation number, then store in the cache memory a copy of the required object retrieved from the storage device, add metadata regarding the stored object to the cache database, the stored object metadata comprising an object generation number equal to the application generation number, add a reference to the stored object to the list of references to objects stored in the cache memory that are being used by the application, and return the copy of the object to the application. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
-
17. A non-transitory computer readable medium having stored thereupon computing instructions comprising:
-
a code segment to intercept a read request from an application running on a computing system; a code segment to determine from the intercepted read request, an identifier for a required object and a required generation number; and a code segment to determine; if the required object is not stored in a cache memory, then store in the cache memory a copy of the required object retrieved from a storage device, add metadata regarding the stored object to the cache database, the stored object metadata comprising an object generation number equal to the application generation number, add a reference to the object to a list of references to objects stored in the cache memory that are being used by the application, and return the copy of the object to the application, else if the required object is stored in the cache memory, and the stored object is of a generation number that is not less than the required generation, then add a reference to the stored object to the list of references to objects stored in the cache memory that are being used by the application, and return the stored object from the cache memory to the application, else if the required object is stored in the cache memory, and the stored object is of a generation number that is less than the required generation number, store in the cache memory a copy of the required object retrieved from a storage device, add metadata regarding the stored object to the cache database, the stored object metadata comprising an object generation number equal to the application generation number, add a reference to the object to the list of references to objects stored in the cache memory that are being used by the application, and return the copy of the object to the application. - View Dependent Claims (18, 19, 20, 21)
-
Specification