|
| | GusdUT_CappedCache (const char *name, int64 size_in_mb=32) |
| |
| | ~GusdUT_CappedCache () override |
| |
| template<typename Item > |
| UT_IntrusivePtr< const Item > | Find (const UT_CappedKey &key) |
| |
| template<typename Item , typename Creator , typename... Args> |
| UT_IntrusivePtr< const Item > | FindOrCreate (const UT_CappedKey &key, const Creator &creator, Args &...args) |
| |
| template<typename T > |
| bool | FindVal (const UT_CappedKey &key) |
| |
| template<typename T , typename Creator , typename... Args> |
| bool | FindOrCreateVal (const UT_CappedKey &key, const Creator &creator, Args &...args) |
| |
| template<typename MatchFn > |
| int64 | ClearEntries (const MatchFn &matchFn) |
| |
| | UT_CappedCache (const char *name, int64 size_in_mb=32) |
| |
| | ~UT_CappedCache () override |
| |
| | UT_CappedCache (const UT_CappedCache &)=delete |
| |
| UT_CappedCache & | operator= (const UT_CappedCache &)=delete |
| |
| void | clear () |
| | Clear the cache. More...
|
| |
| exint | entries () const |
| | Number of entries in the cache. More...
|
| |
| exint | getListEntries () const |
| |
| UT_CappedItemHandle | findItem (const UT_CappedKey &key) |
| | Find an item in the cache. More...
|
| |
| UT_CappedItemHandle | addItem (const UT_CappedKey &key, const UT_CappedItemHandle &item) |
| |
| void | deleteItem (const UT_CappedKey &key) |
| | Remove an item from the cache. More...
|
| |
| template<typename T > |
| void | threadSafeTraversal (T &task) |
| |
| const char * | utGetCacheName () const override |
| |
| bool | utHasMaxSize () const override |
| |
| int64 | utGetCurrentSize () const override |
| |
| int64 | utGetMaxSize () const override |
| |
| void | utSetMaxSize (int64 bytes) override |
| |
| int64 | utReduceCacheSizeBy (int64 bytes) override |
| |
| | UT_Cache () |
| |
| virtual | ~UT_Cache () |
| |
| | UT_Cache (const UT_Cache &)=delete |
| |
| UT_Cache & | operator= (const UT_Cache &)=delete |
| |
| void | utClearCache () |
| |
| virtual bool | utIsEnabled () const |
| | optional - is this cache currently operational. More...
|
| |
| virtual bool | utHasMinSize () const |
| |
| virtual int64 | utGetMinSize () const |
| |
| virtual void | utSetMinSize (int64) |
| |
| virtual bool | utUpdateCacheInfo () |
| |
Variant of UT_CappedCache that improves on item construction. This adds in a mechanism for locking items during construction, to prevent multiple threads from performing the same work to initialize cache items.
Definition at line 82 of file UT_CappedCache.h.