|
Shopify SDK for Unity
|
An interface for defining a cache. More...
Public Member Functions | |
| void | SetMemorySizeLimit (int newLimit) |
| Sets the size limit in bytes that we can store in the cache. More... | |
| T | ResourceForKey (string key) |
| Returns the cached resource saved against the given url. More... | |
| void | SetResourceForKey (string key, T resource) |
| Associates the given key with the given resource in the cache. More... | |
| void | RemoveKey (string key) |
| Removes the key and associated resource instance from the cache. More... | |
| void | Clear () |
| Clears the cache. More... | |
Properties | |
| 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... | |
An interface for defining a cache.
| void Shopify.UIToolkit.Cache< T >.Clear | ( | ) |
Clears the cache.
Implemented in Shopify.UIToolkit.LRUCache< T >.
| void Shopify.UIToolkit.Cache< T >.RemoveKey | ( | string | key | ) |
Removes the key and associated resource instance from the cache.
| key | Key to remove from the cache. |
Implemented in Shopify.UIToolkit.LRUCache< T >.
| T Shopify.UIToolkit.Cache< T >.ResourceForKey | ( | string | key | ) |
Returns the cached resource saved against the given url.
| key | Key mapping to a resource. |
Implemented in Shopify.UIToolkit.LRUCache< T >.
| void Shopify.UIToolkit.Cache< T >.SetMemorySizeLimit | ( | int | newLimit | ) |
Sets the size limit in bytes that we can store in the cache.
| newLimit | New size limit in bytes. |
Implemented in Shopify.UIToolkit.LRUCache< T >.
| void Shopify.UIToolkit.Cache< T >.SetResourceForKey | ( | string | key, |
| T | resource | ||
| ) |
Associates the given key with the given resource in the cache.
| key | Key to cache with. |
| resource | A resource to cache in memory. |
Implemented in Shopify.UIToolkit.LRUCache< T >.
|
get |
Returns the number of entries in the cache (readonly).
|
get |
The current estimated size the cache takes up in memory (readonly).
|
get |
The estimated size limit in bytes of how much memory we want to use for the cache (readonly).