# US 2021/0279057 A1 · Microservice data item storage and retrieval using generation-based cache

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

- Number: US 2021/0279057 A1
- Document ID: US20210279057A1
- Status: Published application
- Kind: A1
- Application number: 16/810,169
- Filed: 2020-03-05
- Published: 2021-09-09
- Earliest claimed: 2020-03-05
- Assignees: EMC IP Holding Company LLC
- Applicants: EMC IP Holding Company LLC
- Inventors: Dominique Prunier
- Web page: https://patentgrep.com/patent/US20210279057A1

## CPC

- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 16/24552: {Database cache management}
- G06F 9/321: {Program or instruction counter, e.g. incrementing}
- G06F 9/3856: {Reordering of instructions, e.g. using queues or age tags}
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 12/0808: with cache invalidating means (G06F12/0815 takes precedence)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are provided for microservice configuration information retrieval and storage using a generation-based cache. One method comprises obtaining, by a first microservice, a data item from a second microservice with a corresponding generation counter; maintaining, by the first microservice, the data item in a cache with the corresponding generation counter; invalidating, by the first microservice, one or more entries in the cache having a lower generation counter value than a current generation counter; and in response to a request for the data item, performing, by the first microservice: processing the requested data item, if the requested data item is in the cache after the invalidation; and if the requested data item is not in the cache after the invalidation: (i) retrieving the requested data item from the second microservice, (ii) processing the retrieved data item and (iii) placing the retrieved requested data item in the cache with a corresponding generation counter value.

## Claims

### Claim 1

A method, comprising:
obtaining, by a first microservice, at least one data item from a second microservice with a corresponding generation counter;
maintaining, by the first microservice, the at least one data item in a cache with the corresponding generation counter;
invalidating, by the first microservice, one or more entries in the cache having a lower generation counter value than a current generation counter; and
in response to a request for the at least one data item, performing the following steps, by the first microservice:
processing the requested at least one data item, if the requested at least one data item is in the cache after the invalidation; and
if the requested at least one data item is not in the cache after the invalidation: (i) retrieving the requested at least one data item from the second microservice, (ii) processing the retrieved at least one data item and (iii) placing the retrieved at least one requested data item in the cache with a corresponding generation counter value,
wherein the method is performed by at least one processing device comprising a processor coupled to a memory.

### Claim 2 (depends on 1)

The method of claim 1, wherein the second microservice comprises a data item retrieval endpoint to retrieve the at least one data item in response to the first microservice retrieving the requested at least one data item from the second microservice.

### Claim 3 (depends on 2)

The method of claim 2, wherein the data item retrieval endpoint provides the at least one data item to the first microservice with the corresponding generation counter value.

### Claim 4 (depends on 1)

The method of claim 1, wherein the second microservice increments the generation counter for each update to a data item within a grouping of data items comprising the at least one data item.

### Claim 5 (depends on 4)

The method of claim 4, wherein the invalidating the one or more entries in the cache having the lower generation counter value than the current generation counter comprises invalidating data items within the grouping of data items comprising the at least one data item.

### Claim 6 (depends on 1)

The method of claim 1, wherein the invalidating further comprises obtaining the current generation counter from a generation counter retrieval endpoint of the second microservice.

### Claim 7 (depends on 1)

The method of claim 1, wherein the invalidating one or more entries in the cache having the lower generation counter value than the current generation counter further comprises evaluating a retrieval time of the current generation counter with respect to one or more freshness criteria and updating the current generation counter responsive to the one or more freshness criteria not being satisfied.

### Claim 8

An apparatus comprising:
at least one processing device comprising a processor coupled to a memory;
the at least one processing device being configured to implement the following steps:
obtaining, by a first microservice, at least one data item from a second microservice with a corresponding generation counter;
maintaining, by the first microservice, the at least one data item in a cache with the corresponding generation counter;
invalidating, by the first microservice, one or more entries in the cache having a lower generation counter value than a current generation counter; and
in response to a request for the at least one data item, performing the following steps, by the first microservice:
processing the requested at least one data item, if the requested at least one data item is in the cache after the invalidation; and
if the requested at least one data item is not in the cache after the invalidation: (i) retrieving the requested at least one data item from the second microservice, (ii) processing the retrieved at least one data item and (iii) placing the retrieved at least one requested data item in the cache with a corresponding generation counter value.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein the second microservice comprises a data item retrieval endpoint to retrieve the at least one data item in response to the first microservice retrieving the requested at least one data item from the second microservice.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the data item retrieval endpoint provides the at least one data item to the first microservice with the corresponding generation counter value.

### Claim 11 (depends on 8)

The apparatus of claim 8, wherein the second microservice increments the generation counter for each update to a data item within a grouping of data items comprising the at least one data item.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the invalidating the one or more entries in the cache having the lower generation counter value than the current generation counter comprises invalidating data items within the grouping of data items comprising the at least one data item.

### Claim 13 (depends on 8)

The apparatus of claim 8, wherein the invalidating further comprises obtaining the current generation counter from a generation counter retrieval endpoint of the second microservice.

### Claim 14 (depends on 8)

The apparatus of claim 8, wherein the invalidating one or more entries in the cache having the lower generation counter value than the current generation counter further comprises evaluating a retrieval time of the current generation counter with respect to one or more freshness criteria and updating the current generation counter responsive to the one or more freshness criteria not being satisfied.

### Claim 15

A non-transitory processor-readable storage medium having stored therein program code of one or more software programs, wherein the program code when executed by at least one processing device causes the at least one processing device to perform the following steps:
obtaining, by a first microservice, at least one data item from a second microservice with a corresponding generation counter;
maintaining, by the first microservice, the at least one data item in a cache with the corresponding generation counter;
invalidating, by the first microservice, one or more entries in the cache having a lower generation counter value than a current generation counter; and
in response to a request for the at least one data item, performing the following steps, by the first microservice:
processing the requested at least one data item, if the requested at least one data item is in the cache after the invalidation; and
if the requested at least one data item is not in the cache after the invalidation: (i) retrieving the requested at least one data item from the second microservice, (ii) processing the retrieved at least one data item and (iii) placing the retrieved at least one requested data item in the cache with a corresponding generation counter value.

### Claim 16 (depends on 15)

The non-transitory processor-readable storage medium of claim 15, wherein the second microservice comprises a data item retrieval endpoint to retrieve the at least one data item in response to the first microservice retrieving the requested at least one data item from the second microservice.

### Claim 17 (depends on 16)

The non-transitory processor-readable storage medium of claim 16, wherein the data item retrieval endpoint provides the at least one data item to the first microservice with the corresponding generation counter value.

### Claim 18 (depends on 15)

The non-transitory processor-readable storage medium of claim 15, wherein the second microservice increments the generation counter for each update to a data item within a grouping of data items comprising the at least one data item.

### Claim 19 (depends on 18)

The non-transitory processor-readable storage medium of claim 18, wherein the invalidating the one or more entries in the cache having the lower generation counter value than the current generation counter comprises invalidating data items within the grouping of data items comprising the at least one data item.

### Claim 20 (depends on 15)

The non-transitory processor-readable storage medium of claim 15, wherein the invalidating further comprises one or more of obtaining the current generation counter from a generation counter retrieval endpoint of the second microservice, and evaluating a retrieval time of the current generation counter with respect to one or more freshness criteria and updating the current generation counter responsive to the one or more freshness criteria not being satisfied.
