Caching data objects on a client side using a prototype chain
First Claim
Patent Images
1. A method for caching a data object, comprising:
- obtaining, with a processor of a computer, a copy of an original data object to a specified depth;
caching the copy of the original data object to the specified depth with reference to the original data object in a prototype chain;
receiving a change to a value of a property of the cached copy;
creating a new property entry for the changed value of the property of the cached copy;
setting a change flag to indicate that there is a changed value for the property;
receiving a submit operation for the cached copy of the data object; and
for the property of the cached copy,determining whether the value of the property has changed;
in response to determining that the value of the property has changed,updating a value of a corresponding property of the original data object; and
resetting the change flag to indicate that the value of the property of the cached copy is a same as the value of the corresponding property of the original data object.
1 Assignment
0 Petitions
Accused Products
Abstract
Provided are a computer implemented method, computer program product, and system for caching a data object. A copy of an original data object to a specified depth is obtained. The copy of the original data object to the specified depth is cached with reference to the original data object in a prototype chain. A change to a value of a property of the cached copy is received. A new property entry is created for the changed value of the property under the cached copy. A change flag is set to indicate that there is a changed value for the property.
10 Citations
15 Claims
-
1. A method for caching a data object, comprising:
-
obtaining, with a processor of a computer, a copy of an original data object to a specified depth; caching the copy of the original data object to the specified depth with reference to the original data object in a prototype chain; receiving a change to a value of a property of the cached copy; creating a new property entry for the changed value of the property of the cached copy; setting a change flag to indicate that there is a changed value for the property; receiving a submit operation for the cached copy of the data object; and for the property of the cached copy, determining whether the value of the property has changed; in response to determining that the value of the property has changed, updating a value of a corresponding property of the original data object; and resetting the change flag to indicate that the value of the property of the cached copy is a same as the value of the corresponding property of the original data object. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer system for caching a data object, comprising:
-
a processor; and a storage device coupled to the processor, wherein the storage device has stored thereon a program, and wherein the processor is configured to execute instructions of the program to perform operations, wherein the operations comprise; obtaining a copy of an original data object to a specified depth; caching the copy of the original data object to the specified depth with reference to the original data object in a prototype chain; receiving a change to a value of a property of the cached copy; creating a new property entry for the changed value of the property of the cached copy; setting a change flag to indicate that there is a changed value for the property; receiving a submit operation for the cached copy of the data object; and for the property of the cached copy, determining whether the value of the property has changed; in response to determining that the value of the property has changed, updating a value of a corresponding property of the original data object; and resetting the change flag to indicate that the value of the property of the cached copy is a same as the value of the corresponding property of the original data object. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A computer program product for caching a data object, the computer program product comprising:
-
a computer readable storage medium having computer readable program code embodied therein, the computer readable program code comprising; computer readable program code, when executed by a processor of a computer, configured to perform; obtaining a copy of an original data object to a specified depth; caching the copy of the original data object to the specified depth with reference to the original data object in a prototype chain; receiving a change to a value of a property of the cached copy; creating a new property entry for the changed value of the property of the cached copy; setting a change flag to indicate that there is a changed value for the property; receiving a submit operation for the cached copy of the data object; and for the property of the cached copy, determining whether the value of the property has changed; in response to determining that the value of the property has changed, updating a value of a corresponding property of the original data object; and resetting the change flag to indicate that the value of the property of the cached copy is a same as the value of the corresponding property of the original data object. - View Dependent Claims (12, 13, 14, 15)
-
Specification