# US 12,217,058 B2 · Multi-layer data cache to prevent user experience interrupts during feature flag management

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

- Number: US 12,217,058 B2
- Document ID: US12217058B2
- Status: Granted
- Kind: B2
- Application number: 18/490,233
- Filed: 2023-10-19
- Published: 2024-04-18
- Granted: 2025-02-04
- Earliest claimed: 2021-12-29
- Assignees: Brex Inc.
- Applicants: Brex Inc.
- Inventors: Ming Xiao; Kingsley Ochu
- Web page: https://patentgrep.com/patent/US12217058B2

## CPC

- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 8/65: Updates (security arrangements therefor G06F21/57)
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30189: {according to execution mode, e.g. mode flag}
- G06F 9/451: Execution arrangements for user interfaces
- H04L 67/568: Storing data temporarily at an intermediate stage, e.g. caching
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

There are provided systems and methods for a multi-layer cache to prevent user experience interrupts during feature flag management. A service provider may provide applications to computing devices of users including mobile applications. Use and availability of features in an application may be configured using feature flags, however, change of these feature flags may initiate an application refresh that affects user experiences with the application. To prevent interruptions, a multi-layer data cache may be used where feature flag data for the feature flags may initially be loaded, after a time period, to a first layer cache that is not used to update the application. When conditions exist for updating the application without affecting the user experience, such as if the user is no longer using a workflow, the feature flag data may be loaded to a second layer cache. The second layer cache may then be used for updating.

## Claims

### Claim 1

A method comprising:
receiving, by an application on a computing device, feature flag data for a feature flag of the application, wherein the feature flag is associated with an application functionality of the application;
storing the feature flag data in a first cache for the application on the computing device, wherein the first cache persists in a memory of the computing device after exiting the application;
detecting a current usage of the application;
determining that a first amount of time has elapsed between the current usage of the application and a previous usage of the application, wherein the first amount of time meets or exceeds a threshold amount of time designated for loading or updating the feature flag for the application functionality; and
determining, based on the current usage and the first amount of time, whether to load or update the feature flag using the feature flag data and a second cache for the application, wherein the second cache is erased after exiting the application.

### Claim 2 (depends on 1)

The method of claim 1, wherein prior to the storing the feature flag data, the method further comprises:
determining that the application functionality is in-use at a time of the previous usage of the application,
and wherein the storing the feature flag data is performed responsive to the determining that the application functionality is in-use at the time.

### Claim 3 (depends on 1)

The method of claim 1, wherein the receiving the feature flag data includes fetching the feature flag data from a service provider server associated with the application in response to a second amount of time elapsing since a last update of at least the feature flag in the application.

### Claim 4 (depends on 3)

The method of claim 3, wherein the current usage comprises one of opening the application or bringing the application to a foreground of an operating system on the computing device, and wherein, prior to the storing the feature flag data, the method further comprises:
determining that the previous usage of the application has been exited or the application has been moved to a background of the operating system during the previous usage.

### Claim 5 (depends on 1)

The method of claim 1, wherein the previous usage is associated with a first timestamp and the current usage is associated with a second timestamp, and wherein the determining that the first amount of time has elapsed includes computing the first amount of time based on the first timestamp and the second timestamp.

### Claim 6 (depends on 5)

The method of claim 5, wherein the determining to load or update the feature flag using the feature flag data includes determining to pause loading or updating the feature flag while the application functionality is being used during the current usage.

### Claim 7 (depends on 1)

The method of claim 1, wherein, in response to determining to load or update the feature flag using the feature flag data, the method further comprises:
moving the feature flag data from the first cache to the second cache during the current usage; and
executing a deployment of the feature flag data from the second cache during the current usage.

### Claim 8 (depends on 1)

The method of claim 1, wherein the first cache comprises a persistent storage or a semi-persistent storage that persists after one or more of closing the application, moving to the application to a background of an operating system on the computing device, or removing the application from an active usage on the computing device, and wherein the second cache comprises a temporary in-memory cache while the application is open and in a foreground of an operating system of the computing device.

### Claim 9

A computing device comprising:
a non-transitory memory; and
one or more hardware processors coupled to the non-transitory memory and configured to read instructions from the non-transitory memory to cause the computing device to perform operations comprising:
detecting a current usage of an application on the computing device;
accessing, by the application, feature flag data for a feature flag of the application, wherein the feature flag is associated with an application functionality of the application, wherein the feature flag is stored in a first cache for the application on the computing device, and wherein the first cache persists in a memory of the computing device after exiting the application;
determining that a first amount of time has elapsed between the current usage of the application and a previous usage of the application, wherein the first amount of time meets or exceeds a threshold amount of time designated for loading or updating the feature flag for the application functionality; and
determining, based on the current usage and the first amount of time, whether to load or update the feature flag using the feature flag data and a second cache for the application, wherein the second cache is erased after exiting the application.

### Claim 10 (depends on 9)

The computing device of claim 9, wherein prior to the storing the feature flag data, the operations further comprise:
determining that the application functionality is in-use at a time of the previous usage of the application,
and wherein the storing the feature flag data is performed responsive to the determining that the application functionality is in-use at the time.

### Claim 11 (depends on 10)

The computing device of claim 10, wherein the receiving the feature flag data includes fetching the feature flag data from a service provider server associated with the application in response to a second amount of time elapsing since a last update of at least the feature flag in the application.

### Claim 12 (depends on 11)

The computing device of claim 11, wherein the current usage comprises one of opening the application or bringing the application to a foreground of an operating system on the computing device, and wherein, prior to the storing the feature flag data, the operations further comprise:
determining that the previous usage of the application has been exited or the application has been moved to a background of the operating system during the previous usage.

### Claim 13 (depends on 9)

The computing device of claim 9, wherein the previous usage is associated with a first timestamp and the current usage is associated with a second timestamp, and wherein the determining that the first amount of time has elapsed including computing the first amount of time based on the first timestamp and the second timestamp.

### Claim 14 (depends on 9)

The computing device of claim 9, wherein, in response to determining to load or update the feature flag using the feature flag data, the operations further comprise:
moving the feature flag data from the first cache to the second cache during the current usage; and
executing a deployment of the feature flag data from the second cache during the current usage.

### Claim 15 (depends on 14)

The computing device of claim 14, wherein the determining to load or update the feature flag using the feature flag data includes determining to pause loading or updating the feature flag while the application functionality is being used during the current usage.

### Claim 16 (depends on 9)

The computing device of claim 9, wherein the first cache comprises a persistent storage or a semi-persistent storage that persist after one or more of closing the application, moving to the application to a background of an operating system on the computing device, or removing the application from an active usage on the computing device, and wherein the second cache comprises a temporary in-memory cache while the application is open and in a foreground of an operating system of the computing device.

### Claim 17

A non-transitory machine-readable medium having stored thereon machine-readable instructions executable to cause a computing device to perform operations comprising:
receiving, by an application on the computing device, feature flag data for a feature flag of the application, wherein the feature flag is associated with an application functionality of the application;
storing the feature flag data in a first memory for the application on the computing device, wherein the memory persists in the computing device after exiting the application;
detecting a current usage of the application;
determining that a first amount of time has elapsed between the current usage of the application and a previous usage of the application, wherein the first amount of time meets or exceeds a threshold amount of time designated for loading or updating the feature flag for the application functionality; and
determining, based on current usage and the first amount of time, whether to load or update the feature flag using the feature flag data and a second memory for the application, wherein the second memory is erased after exiting the application.

### Claim 18 (depends on 17)

The non-transitory machine-readable medium of claim 17, wherein prior to the storing the feature flag data, the operations further comprise:
determining that the application functionality is in-use at a time of the previous usage of the application,
and wherein the storing the feature flag data is performed responsive to the determining that the application functionality is in-use at the time.

### Claim 19 (depends on 17)

The non-transitory machine-readable medium of claim 17, wherein the receiving the feature flag data includes fetching the feature flag data from a service provider server associated with the application in response to a second amount of time elapsing since a last update of at least the feature flag in the application.

### Claim 20 (depends on 19)

The non-transitory machine-readable medium of claim 19, wherein the current usage comprises one of opening the application or bringing the application to a foreground of an operating system on the computing device, and wherein, prior to the storing the feature flag data, the operations further comprise:
determining that the previous usage of the application has been exited or the application has been moved to a background of the operating system during the previous usage.
