# US 2013/0159627 A1 · System and method for managing a cache using file system metadata

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

- Number: US 2013/0159627 A1
- Document ID: US20130159627A1
- Status: Published application
- Kind: A1
- Application number: 13/766,539
- Filed: 2013-02-13
- Published: 2013-06-20
- Earliest claimed: 2010-11-30
- Assignees: Open Text Corporation
- Inventors: JAMES CONRAD SHEA
- Web page: https://patentgrep.com/patent/US20130159627A1

## CPC

- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/0897: with two or more cache hierarchy levels (with multilevel cache hierarchies G06F12/0811)
- G06F 12/122: of the least frequently used [LFU] type, e.g. with individual count value
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 12/0871: Allocation or management of cache space
- G06F 2212/466: Metadata, control data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods for management of a cache are disclosed. In general, embodiments described herein store access counts in file system metadata associated with files in the cache. By encoding access counts in the file system metadata, file I/O operations are reduced. Preferably, the reference count is encoded in an access count timestamp in the file system metadata. The access counts can be decoded based on the difference between the access count time stamp and a base time value, with larger differences reflecting a larger access count. The cache can be aged by advancing the base time value, thereby causing the access count for a file to drop. The base time value can also be stored in file system metadata, thereby reducing file I/O operations when performing aging.

## Claims

### Claim 1

A cache management system comprising:
a processor;
a memory;
a secondary storage device;
a non-transitory computer readable storage medium storing a set of computer instructions, the set of computer instructions comprising instructions executable to:
manage a multi-level cache comprising a first cache and a second cache;
store an asset in the second cache as a cached asset;
store a version of the cached asset in the first cache;
maintain an first cache access count for the version of the asset in the first cache;
encode a second cache access count for the cached asset in an access count timestamp in metadata associated with the cached asset; and
determine whether to evict the cached asset from the second cache based on the access count timestamp;
update the second cache access count with the first cache access count to generate an updated second cache access count;
encode the updated second cache access count in an updated access count timestamp.

### Claim 2 (depends on 1)

The cache management system of claim 1, wherein encoding the second cache access count comprises adding the second cache access count times a time constant to a base time value to generate an access count timestamp value and storing the access count timestamp in the metadata associated with the cached asset.

### Claim 3 (depends on 2)

The system of claim 2, wherein set of computer instructions further comprise instructions executable to:
decode the second cache access count from the access count timestamp;
add the first cache access count to the second cache access count to generate the updated second cache access count.

### Claim 4 (depends on 2)

The system of claim 2, further wherein the set of computer instructions further comprise instructions executable to age the second cache by updating the base time value.

### Claim 5 (depends on 4)

The system of claim 4, wherein the set of computer instructions further comprise instructions executable to evict the cached asset from the second cache if the access count timestamp is less than a threshold time.

### Claim 6

A method for managing a multi-level cache for a device having a first cache and a second cache, the method comprising:
storing an asset in the second cache as a cached asset;
storing a version of the cached asset in the first cache;
maintaining a first cache access count for the version of the cached asset in the first cache;
encoding a second cache access count for the cached asset in an access count timestamp in metadata associated with the cached asset; and
transforming a state of the second cache by evicting the cached asset from the second cache based on the access count timestamp value;
updating the second cache access count with the first cache access count to generated an updated second cache access count; and
encoding the updated second cache access count in an updated access count timestamp.

### Claim 7 (depends on 6)

The method of claim 6, wherein encoding the second cache access count comprises adding the second cache access count times a time constant to a base time value to generate an access count timestamp value and storing the access count timestamp in the metadata associated with the cached asset.

### Claim 8 (depends on 7)

The method of claim 7, wherein updating the second cache access count comprises:
decoding the second cache access count from the access count timestamp,
adding the first cache access count to the second cache access count to generate the updated second cache access count.

### Claim 9 (depends on 8)

The method of claim 8, further comprising aging the second cache by updating the base time value to a new base time value.

### Claim 10 (depends on 9)

The method of claim 9, further comprising evicting the cached asset from the second cache if the access count timestamp value is less than the new base time value.

### Claim 11 (depends on 10)

The method of claim 10, further comprising providing a cache management system comprising a memory, a storage device, an in-memory access count module, an encoding module, a decoding module, a resolving module, an aging module, and an eviction module, wherein:
maintaining the first cache access count is performed by the in-memory access count module;
encoding the second cache access count is performed by the encoding module;
decoding the second cache access count from the access count timestamp is performed by the decoding module;
updating the second cache access count with the first cache access count is performed by the resolving module;
aging the second cache is performed by the aging module; and
expunging the cached asset from second cache is performed by the eviction module.

### Claim 12 (depends on 6)

The method of claim 6, further comprising maintaining an access count file associated with the cached asset in a file-system based cache, wherein the metadata associated with the cached asset is file system metadata for the access count file.

### Claim 13

A computer program product comprising a non-transitory computer readable medium storing computer executable instructions, the computer executable instructions comprising instruction executable to:
store a version of a cached asset in a first cache, the cached asset stored in a second cache;
maintain a first cache access count for the version of the cached asset in the second cache;
encode a second cache access count for the cached asset in an access count timestamp in metadata associated with the cached asset; and
transform a state of the second cache by evicting the cached asset from the second cache based on the access count timestamp value;
update the second cache access count with the first cache access count to generate an updated second cache access count; and
encode the updated second cache access count in an updated access count timestamp.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein encoding the second cache access count comprises adding the second cache access count times a time constant to a base time value to generate an access count timestamp value and storing the access count timestamp value in the metadata associated with the cached asset.

### Claim 15 (depends on 14)

The computer program product of claim 14, wherein set of computer instructions further comprise instructions executable to:
decode the second cache access count from the access count timestamp,
add the first cache access count to the second cache access count to generate the updated second cache access count.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein the set of computer instructions further comprise instructions executable to age the second cache by updating the base time value to a new base time value.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein the set of computer instructions further comprise instructions executable to expunge the cached asset from the second cache based on the access count timestamp.
