IP Library Granted Patent US 12705180
Granted Patent B2
US 12705180 · App. 19/083,016 · Granted Aug 11, 2026

Index-based cache for key-value storage

Inventors: Christopher O'Hara (Buderim, AU); Achille Roussel (San Francisco, CA)
Assignee: Twilio Inc.
G06F12/0886G06F12/0804G06F12/1466G06F2212/1021
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12705180
App. No.
19/083,016
Granted
Aug 11, 2026
Kind
B2
Abstract

Various embodiments include systems, methods, and non-transitory computer-readable media for managing data using persistent storage. Consistent with these embodiments, a method includes receiving a write request that includes a value and a key; processing the write request, the processing of the write request including generating a message that includes the value; transmitting the message to an external system for storage of the value; generating an index based on a mapping of the key to an offset; and storing the value and the index in a local persistent storage.

Claims (63)

1 . A method comprising:

receiving a read request that comprises a key;

identifying an index based on the key, the index corresponding to one or more messages stored in a cache of a local persistent storage;

reconstructing a value of the key based on the one or more messages; and

processing the read request based on the value of the key.

2 . The method of claim 1 , comprising:

determining that the one or more messages comprise data changes to the key, and

reconstructing the value of the key comprising applying the data changes to content of the one or more messages.

3 . The method of claim 1 , comprising:

determining that the one or more messages have been removed from the cache of the local persistent storage; and

reading the one or more messages from an external system, the reading comprising accessing a mapping of the key to one or more offsets associated with the one or more messages, and providing the one or more offsets to the external system.

4 . The method of claim 3 , wherein an offset from the one or more offsets comprises an identifier assigned to a storage unit associated with the external system and wherein the offset represents a position of a message stored in the storage unit.

5 . The method of claim 3 , wherein the local persistent storage provides a compact view of messages stored in the external system in a local key-value store.

6 . The method of claim 1 , wherein the key is a first key, wherein the value is a first value, wherein the index is a first index, comprising:

receiving a write request that comprises a second value and a second key;

processing the write request, the processing of the write request comprising generating a message that comprises the second value;

transmitting the message to an external system for storage, the message being associated with an offset value indicating a storage position of the message in the external system;

generating a second index based on the offset value associated with the message and the second key; and

storing the second index in the local persistent storage.

7 . The method of claim 6 , further comprising:

storing the second value in the cache of the local persistent storage;

determining that a frequency of access to the second value from the cache in the local persistent storage is below a threshold value; and

deleting the second value and the second index from the cache of the local persistent storage.

8 . The method of claim 7 , wherein the threshold value is determined based on one or more factors comprising system latency, memory storage space, data processing power, and a configuration determined by a system administrator or an authorized user.

9 . The method of claim 1 , further comprising:

accessing a plurality of variables;

applying a formula to calculate a cache size based on one or more variables; and

estimating a plurality of storage requirements for the local persistent storage based on the cache size.

10 . The method of claim 9 , wherein the one or more variables comprises one or more of an average rate of director job execution, an average number of items written per job execution, an average size of a plurality of messages, and an average retention of items.

11 . A system comprising:

at least one memory storing instructions; and

one or more hardware processors communicatively coupled to the memory and configured by the instructions to perform operations comprising:

receiving a read request that comprises a key;

identifying an index based on the key, the index corresponding to one or more messages stored in a cache of a local persistent storage;

reconstructing a value of the key based on the one or more messages; and

processing the read request based on the value of the key.

12 . The system of claim 11 , wherein the operations comprise:

determining that the one or more messages comprise data changes to the key, and

reconstructing the value of the key comprising applying the data changes to content of the one or more messages.

13 . The system of claim 11 , wherein the operations comprise:

determining that the one or more messages have been removed from the cache of the local persistent storage; and

reading the one or more messages from an external system, the reading comprising accessing a mapping of the key to one or more offsets associated with the one or more messages, and providing the one or more offsets to the external system.

14 . The system of claim 13 , wherein an offset from the one or more offsets comprises an identifier assigned to a storage unit associated with the external system and wherein the offset represents a position of a message stored in the storage unit.

15 . The system of claim 13 , wherein the local persistent storage provides a compact view of messages stored in the external system in a local key-value store.

16 . The system of claim 11 , wherein the key is a first key, wherein the value is a first value, wherein the index is a first index, and wherein the operations comprise:

receiving a write request that comprises a second value and a second key;

processing the write request, the processing of the write request comprising generating a message that comprises the second value;

transmitting the message to an external system for storage, the message being associated with an offset value indicating a storage position of the message in the external system;

generating a second index based on the offset value associated with the message and the second key; and

storing the second index in the local persistent storage.

17 . The system of claim 16 , wherein the operations comprise:

storing the second value in the cache of the local persistent storage;

determining that a frequency of access to the second value from the cache in the local persistent storage is below a threshold value; and

deleting the second value and the second index from the cache of the local persistent storage.

18 . The system of claim 17 , wherein the threshold value is determined based on one or more factors comprising system latency, memory storage space, data processing power, and a configuration determined by a system administrator or an authorized user.

19 . The system of claim 11 , wherein the operations comprise:

accessing a plurality of variables;

applying a formula to calculate a cache size based on one or more variables; and

estimating a plurality of storage requirements for the local persistent storage based on the cache size.

20 . A non-transitory computer-readable medium comprising instructions that, when executed by a hardware processor of a device, cause the device to perform operations comprising:

receiving a read request that comprises a key;

identifying an index based on the key, the index corresponding to one or more messages stored in a cache of a local persistent storage;

reconstructing a value of the key based on the one or more messages, and processing the read request based on the value of the key.