Handles everything related to asset caching.
More...
#include <resolverContextCache.h>
Handles everything related to asset caching.
◆ ResolverContextCache()
| ResolverContextCache::ResolverContextCache |
( |
| ) |
|
◆ ~ResolverContextCache()
| ResolverContextCache::~ResolverContextCache |
( |
| ) |
|
◆ ClearCache()
| void ResolverContextCache::ClearCache |
( |
| ) |
|
Clear the complete cache.
◆ getAsset()
| AssetIdentifier ResolverContextCache::getAsset |
( |
const std::string & |
assetIdentifier, |
|
|
const CacheName |
selectedCache, |
|
|
const bool |
isAyonPath |
|
) |
| |
Return an asset by searching the selected cache.
If not found, resolve against AYON. Returns empty path if resolution fails.
- Parameters
-
| assetIdentifier | The asset URI to resolve |
| selectedCache | Which cache to search first |
| isAyonPath | Whether this is an AYON URI |
- Returns
- AssetIdentifier with resolved path
◆ insert()
Move the asset into the preCache.
Checks space and migrates if needed. This function is both locking and blocking.
- Parameters
-
| sourceAssetIdent | The asset data to add to the cache |
◆ isCacheStatic()
| bool ResolverContextCache::isCacheStatic |
( |
| ) |
const |
Check if cache is static (no dynamic resolution)
◆ migratePreCacheIntoAyonCache()
| void ResolverContextCache::migratePreCacheIntoAyonCache |
( |
| ) |
|
Move the precache into the AyonCache to free the precache.
◆ printCache()
| void ResolverContextCache::printCache |
( |
| ) |
const |
Print every object in the cache for debugging.
◆ removeCachedObject() [1/2]
| void ResolverContextCache::removeCachedObject |
( |
const std::string & |
key | ) |
|
Delete an entry from the cache.
- Parameters
-
| key | The asset identifier/URI |
◆ removeCachedObject() [2/2]
| void ResolverContextCache::removeCachedObject |
( |
const std::string & |
key, |
|
|
const CacheName |
selectedCache |
|
) |
| |
Delete an entry from a selected cache.
PreCache is always searched.
- Parameters
-
| key | The asset identifier/URI |
| selectedCache | Which cache to remove from |
◆ setCacheFromPinningFile()
| void ResolverContextCache::setCacheFromPinningFile |
( |
const std::string & |
pinningFilePath | ) |
|
Set up the cache from a pinning file.
- Parameters
-
| pinningFilePath | Path to the pinning file |
◆ m_ayon
| std::optional<std::unique_ptr<AyonApi> > ResolverContextCache::m_ayon |
|
private |
◆ m_AyonCache
◆ m_AyonCacheSharedMutex
| std::shared_mutex ResolverContextCache::m_AyonCacheSharedMutex |
|
mutableprivate |
◆ m_CommonCache
◆ m_CommonCacheSharedMutex
| std::shared_mutex ResolverContextCache::m_CommonCacheSharedMutex |
|
mutableprivate |
◆ m_pinningFileHandler
◆ m_PreCache
◆ m_PreCacheSharedMutex
| std::shared_mutex ResolverContextCache::m_PreCacheSharedMutex |
|
mutableprivate |
◆ m_staticCache
| bool ResolverContextCache::m_staticCache |
|
private |
The documentation for this class was generated from the following files: