use of org.wso2.carbon.identity.application.mgt.internal.cache.ApplicationBasicInfoResourceIdCacheKey in project carbon-identity-framework by wso2.
the class CacheBackedApplicationDAO method getApplicationBasicInfoFromCacheByResourceId.
private ApplicationBasicInfo getApplicationBasicInfoFromCacheByResourceId(String resourceId, String tenantDomain) {
ApplicationBasicInfo applicationBasicInfo = null;
if (resourceId != null) {
ApplicationBasicInfoResourceIdCacheKey cacheKey = new ApplicationBasicInfoResourceIdCacheKey(resourceId);
ApplicationBasicInfoCacheEntry entry = appBasicInfoCacheByResourceId.getValueFromCache(cacheKey, tenantDomain);
if (entry != null) {
applicationBasicInfo = entry.getApplicationBasicInfo();
}
}
if (applicationBasicInfo == null) {
if (log.isDebugEnabled()) {
log.debug("Cache miss for the application with resourceId: " + resourceId);
}
} else {
if (log.isDebugEnabled()) {
log.debug("Cache hit for the application with resourceId: " + resourceId);
}
}
return applicationBasicInfo;
}
use of org.wso2.carbon.identity.application.mgt.internal.cache.ApplicationBasicInfoResourceIdCacheKey in project carbon-identity-framework by wso2.
the class CacheBackedApplicationDAO method addAppBasicInfoToCache.
private void addAppBasicInfoToCache(ApplicationBasicInfo appBasicInfo, String tenantDomain) {
if (log.isDebugEnabled()) {
log.debug("Add cache for the application " + appBasicInfo.getApplicationName() + "@" + tenantDomain);
}
ApplicationBasicInfoResourceIdCacheKey key = new ApplicationBasicInfoResourceIdCacheKey(appBasicInfo.getApplicationResourceId());
ApplicationBasicInfoCacheEntry entry = new ApplicationBasicInfoCacheEntry(appBasicInfo);
appBasicInfoCacheByResourceId.addToCache(key, entry, tenantDomain);
ApplicationBasicInfoNameCacheKey nameKey = new ApplicationBasicInfoNameCacheKey(appBasicInfo.getApplicationName());
appBasicInfoCacheByName.addToCache(nameKey, entry, tenantDomain);
}
Aggregations