Inheritance diagram for fiftyone.caching.PutCacheBuilder:
Collaboration diagram for fiftyone.caching.PutCacheBuilder:
Public Member Functions | |
| PutCacheBuilder | setUpdateExisting (boolean update) |
| Set whether or not an existing item in the cache should be updated with the value given to the put method. | |
| < K, V > PutCache< K, V > | build (Cache< K, V > c, int cacheSize) |
| Build a new instance of the cache. | |
Member Function Documentation
◆ build()
Build a new instance of the cache.
- Parameters
-
c a cache to get the key and value types from cacheSize size of the cache <K> type of key to store in the cache <V> type of value to store in the cache
- Returns
- a new cache instance
Implements fiftyone.caching.CacheBuilder.
◆ setUpdateExisting()
| PutCacheBuilder fiftyone.caching.PutCacheBuilder.setUpdateExisting | ( | boolean | update | ) |
Set whether or not an existing item in the cache should be updated with the value given to the put method.
By default this is false, meaning that if put is called for a key which already exists in the cache, the existing value is kept and there is no result to the put method
- Parameters
-
update true if existing items should be updated by the put method
- Returns
- this builder
Implemented in fiftyone.caching.LruPutCache< K, V >.Builder.
