A cache that uses a Least Recently Used (LRU) heurstic for evicting items.
More...
|
| LRUCache (int memorySizeLimit) |
|
|
int | MemorySizeLimit [get] |
| The estimated size limit in bytes of how much memory we want to use for the cache (readonly). More...
|
|
int | EstimatedMemorySize [get] |
| The current estimated size the cache takes up in memory (readonly) More...
|
|
int | Count [get] |
| Returns the number of entries in the cache. More...
|
|
int | MemorySizeLimit [get] |
| The estimated size limit in bytes of how much memory we want to use for the cache (readonly). More...
|
|
int | EstimatedMemorySize [get] |
| The current estimated size the cache takes up in memory (readonly). More...
|
|
int | Count [get] |
| Returns the number of entries in the cache (readonly). More...
|
|
A cache that uses a Least Recently Used (LRU) heurstic for evicting items.
◆ Clear()
◆ RemoveKey()
Removes the key and associated resource instance from the cache.
- Parameters
-
key | Key to remove from the cache. |
Implements Shopify.UIToolkit.Cache< T >.
◆ ResourceForKey()
Returns the cached resource saved against the given url.
- Parameters
-
key | Key mapping to a resource. |
- Returns
- The cached resource associated with the given key.
Implements Shopify.UIToolkit.Cache< T >.
◆ SetMemorySizeLimit()
Sets the size limit in bytes that we can store in the cache.
- Parameters
-
newLimit | New size limit in bytes. |
Implements Shopify.UIToolkit.Cache< T >.
◆ SetResourceForKey()
Associates the given key with the given resource in the cache.
- Parameters
-
key | Key to cache with. |
resource | A resource to cache in memory. |
Implements Shopify.UIToolkit.Cache< T >.
◆ DEFAULT_MEMORY_SIZE_LIMIT
The default estimated memory size limit in bytes.
◆ Count
Returns the number of entries in the cache.
- Returns
- Number of entries in the cache.
◆ EstimatedMemorySize
The current estimated size the cache takes up in memory (readonly)
- Returns
◆ MemorySizeLimit
The estimated size limit in bytes of how much memory we want to use for the cache (readonly).
- Returns
The documentation for this class was generated from the following file:
- Assets/Shopify/UIToolkit/Internal/Components/LRUCache.cs