# US 2021/0240697 A1 · Managing objects in shared caches using multiple chains

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0240697 A1
- Document ID: US20210240697A1
- Status: Published application
- Kind: A1
- Application number: 16/779,475
- Filed: 2020-01-31
- Published: 2021-08-05
- Earliest claimed: 2020-01-31
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Serge Philippe Rielau; Rui Zhang
- Web page: https://patentgrep.com/patent/US20210240697A1

## CPC

- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/24552: {Database cache management}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for maintaining cache of database objects using a chain set that includes multiple chains each specifying an ordering of database objects is disclosed. In response to a change of state of a particular database object, a corresponding chain is selected. The selected chain is then locked, the state of the particular database object changed, and then the selected chain is unlocked.

## Claims

### Claim 1

A method, comprising:
maintaining, by a computer system, a chain set having a plurality of chains, wherein each chain of the plurality of chains specifies an ordering of database objects that are stored in a cache;
monitoring, by the computer system, respective states of a plurality of database objects;
in response to determining that a state of a particular database object has changed, selecting, by the computer system, a particular one of the plurality of chains corresponding to the particular database object; and
updating, by the computer system, the particular chain without preventing other ones of the plurality of chains from being accessed during the updating, wherein the updating includes:
locking the particular chain;
changing the locked particular chain to reflect a changed state of the particular database object; and
after the updating, unlocking the particular chain.

### Claim 2 (depends on 1)

The method of claim 1, wherein changing the locked particular chain includes adding the particular database object to the chain.

### Claim 3 (depends on 1)

The method of claim 1, wherein changing the locked particular chain includes removing the particular database object from the chain.

### Claim 4 (depends on 1)

The method of claim 1, wherein the ordering of database objects that are stored in the cache is based, at least in part, on relative frequencies of use of the database objects.

### Claim 5 (depends on 1)

The method of claim 1, further comprising, in response to determining, by the computer system, that a new chain is to be added to the chain set:
locking the chain set;
adding the new chain to the chain set; and
unlocking the chain set.

### Claim 6 (depends on 5)

The method of claim 5, further comprising, performing, by the computer system, a garbage collection operation on the chain set, in response to determining a number of chains included in the chain set is greater than a threshold value.

### Claim 7

A non-transitory computer readable medium having programming instructions stored thereon that are capable of causing a computer system to implement operations comprising:
maintaining, by the computer system, a chain set having a plurality of chains, wherein each chain of the plurality of chains specifies an ordering of database objects that are stored in a cache;
monitoring, by the computer system, respective states of a plurality of database objects;
in response to determining that a state of a particular database object has changed, selecting, by the computer system, a particular one of the plurality of chains corresponding to the particular database object; and
updating, by the computer system, the particular chain without preventing other ones of the plurality of chains from being accessed during the updating, wherein the updating includes:
locking the particular chain;
changing the locked particular chain to reflect a changed state of the particular database object; and
after the updating, unlocking the particular chain.

### Claim 8 (depends on 7)

The non-transitory computer readable storage medium of claim 7, wherein changing the locked particular chain includes adding the particular database object to the chain.

### Claim 9 (depends on 7)

The non-transitory computer readable storage medium of claim 7, wherein changing the locked particular chain includes removing the particular database object from the chain.

### Claim 10 (depends on 7)

The non-transitory computer readable storage medium of claim 7, wherein the ordering of database objects that are stored in the cache is based, at least in part, on relative frequencies of use of the database objects.

### Claim 11 (depends on 7)

The non-transitory computer readable storage medium of claim 7, further comprising, in response to determining, by the computer system, that a new chain is to be added to the chain set:
locking the chain set;
adding the new chain to the chain set; and
unlocking the chain set.

### Claim 12 (depends on 11)

The non-transitory computer readable storage medium of claim 11, further comprising, performing, by the computer system, a garbage collection operation on the chain set, in response to determining a number of chains included in the chain set is greater than a threshold value.

### Claim 13 (depends on 7)

The non-transitory computer readable storage medium of claim 7, wherein a first chain of the plurality of chains specifies an ordering of a first plurality of a set of database objects associated with a set of identifiers introduced by a first release of a software application, and wherein a second chain of the plurality of chains specifies an ordering of a second plurality of a set of database objects associated with a different set of identifiers introduced by a first or a second release of the software application.

### Claim 14

A computer system, comprising:
one or more memories that, during operation, store instructions, and
one or more compute resources that, during operation, receive instructions from the one or more memories and execute the instructions to cause the computer system to perform operations including:
maintaining, by the computer system, a chain set having a plurality of chains, wherein each chain of the plurality of chains specifies an ordering of database objects that are stored in a cache;
monitoring, by the computer system, respective states of a plurality of database objects;
in response to determining that a state of a particular database object has changed, selecting, by the computer system, a particular one of the plurality of chains corresponding to the particular database object; and
updating, by the computer system, the particular chain without preventing other ones of the plurality of chains from being accessed during the updating, wherein the updating includes:
locking the particular chain;
changing the locked particular chain to reflect a changed state of the particular database object; and
after the updating, unlocking the particular chain.

### Claim 15 (depends on 14)

The computer system of claim 14, wherein changing the locked particular chain includes adding the particular database object to the chain.

### Claim 16 (depends on 14)

The computer system of claim 14, wherein changing the locked particular chain includes removing the particular database object from the chain.

### Claim 17 (depends on 14)

The computer system of claim 14, wherein the ordering of database objects that are stored in the cache is based, at least in part, on relative frequencies of use of the database objects.

### Claim 18 (depends on 14)

The computer system of claim 14, further comprising, in response to determining, by the computer system, that a new chain is to be added to the chain set:
locking the chain set;
adding the new chain to the chain set; and
unlocking the chain set.

### Claim 19 (depends on 18)

The computer system of claim 18, further comprising, performing, by the computer system, a garbage collection operation on the chain set, in response to determining a number of chains included in the chain set is greater than a threshold value.

### Claim 20 (depends on 14)

The computer system of claim 14, wherein a first chain of the plurality of chains specifies an ordering of a first plurality of a set of database objects associated with a set of identifiers introduced by a first release of a software application, and wherein a second chain of the plurality of chains specifies an ordering of a second plurality of a set of database objects associated with a different set of identifiers introduced by a first or a second release of the software application.
