{
if(pResource == nullptr)
{
- throw InvalidParameter{"[requestResourceCache] Primitive Resource is invaild"};
+ throw InvalidParameterException{"[requestResourceCache] Primitive Resource is invaild"};
}
CacheID retID = 0;
{
if(func == NULL || func == nullptr)
{
- throw InvalidParameter{"[requestResourceCache] CacheCB is invaild"};
+ throw InvalidParameterException{"[requestResourceCache] CacheCB is invaild"};
}
if(!reportTime)
{
{
if(id == 0 || cacheIDmap.find(id) == cacheIDmap.end())
{
- throw InvalidParameter{"[cancelResourceCache] CacheID is invaild"};
+ throw InvalidParameterException{"[cancelResourceCache] CacheID is invaild"};
}
DataCachePtr foundCacheHandler = findDataCache(id);
{
cacheIDmap.erase(id);
}
+ if(foundCacheHandler->isEmptySubscriber())
+ {
+ s_cacheDataList->remove(foundCacheHandler);
+ foundCacheHandler.reset();
+ }
}
}
{
if(pResource == nullptr)
{
- throw InvalidParameter{"[updateResourceCache] Primitive Resource is invaild"};
+ throw InvalidParameterException
+ {"[updateResourceCache] Primitive Resource is invaild"};
}
DataCachePtr foundCache = findDataCache(pResource);
if(foundCache == nullptr)
{
- throw InvalidParameter{"[updateResourceCache] Primitive Resource is invaild"};
+ throw InvalidParameterException
+ {"[updateResourceCache] Primitive Resource is invaild"};
}
foundCache->requestGet();
}
{
if(updateId == 0)
{
- throw InvalidParameter{"[getCachedData] CacheID is invaild"};
+ throw InvalidParameterException{"[getCachedData] CacheID is invaild"};
}
DataCachePtr foundCache = findDataCache(updateId);
if(foundCache == nullptr)
{
- throw InvalidParameter{"[getCachedData] CacheID is invaild"};
+ throw InvalidParameterException{"[getCachedData] CacheID is invaild"};
}
foundCache->requestGet();
}
{
if(pResource == nullptr)
{
- throw InvalidParameter{"[getCachedData] Primitive Resource is invaild"};
+ throw InvalidParameterException{"[getCachedData] Primitive Resource is invaild"};
}
DataCachePtr handler = findDataCache(pResource);
if(handler == nullptr)
{
- throw InvalidParameter{"[getCachedData] Primitive Resource is invaild"};
+ throw InvalidParameterException{"[getCachedData] Primitive Resource is invaild"};
}
return handler->getCachedData();
}
{
if(id == 0)
{
- throw InvalidParameter{"[getCachedData] CacheID is invaild"};
+ throw InvalidParameterException{"[getCachedData] CacheID is invaild"};
}
DataCachePtr handler = findDataCache(id);
if(handler == nullptr)
{
- throw InvalidParameter{"[getCachedData] CacheID is invaild"};
+ throw InvalidParameterException{"[getCachedData] CacheID is invaild"};
}
return handler->getCachedData();
}
{
if(pResource == nullptr)
{
- throw InvalidParameter{"[getResourceCacheState] Primitive Resource is invaild"};
+ throw InvalidParameterException{"[getResourceCacheState] Primitive Resource is invaild"};
}
DataCachePtr handler = findDataCache(pResource);
{
if(id == 0)
{
- throw InvalidParameter{"[getResourceCacheState] CacheID is invaild"};
+ throw InvalidParameterException{"[getResourceCacheState] CacheID is invaild"};
}
DataCachePtr handler = findDataCache(id);