Patent ID: 11940923
Assignee: AMAZON TECHNOLOGIES, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G  H | IPC G  H

Claim 0:
1. A method, using one or more processors, comprising:
storing a plurality of cache entries at a cache stored in a computer memory, individual ones of the cache entries including respective computed data and a plurality of cost measures of different cost types, wherein for the individual one of the cache entries, respective ones of the cost measures of the different cost types represent respective different computing costs for respective different types of resources to generate the computed data for the respective cache entries;
recording respective frequencies of access at which the respective individual cache entries are accessed;
receiving an incoming cache entry to add to the cache, wherein the incoming cache entry has a plurality of cost measures of the different cost types included as part of the incoming cache entry;
determining a cache entry to be evicted from the cache, comprising comparing respective total cost among respective ones of the cache entries to identify the cache entry whose respective total cost is lower than the respective total cost of others of the cache entries as the cache entry to be evicted from the cache, wherein the respective total cost for respective ones of the cache entries:
is computed as one of the cost measures stored in the respective cache entry, that represents a currently constrained resource, combined with the frequency of access of the respective cache entry, or
is based on a weighted combination of the plurality of cost measures, stored in the respective cache entry, combined with the frequency of access of the respective cache entry;

removing the cache entry determined to be evicted from the cache; and
writing the incoming cache entry, including the plurality of cost measures of the different cost types received from the application, into the cache stored in the computer memory.