/* (non-Javadoc)
@see org.apereo.portal.rendering.xslt.TransformerSource#getCacheKey(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
498958
@Override
    public final CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
        final Resource stylesheetResource = this.getStylesheetResource(request);
        final Serializable stylesheetCacheKey;
        try {
            stylesheetCacheKey = this.xmlUtilities.getStylesheetCacheKey(stylesheetResource);
        } catch (TransformerConfigurationException e) {
            throw new RuntimeException(
                    "Failed to get Transformer for stylesheet: " + stylesheetResource, e);
        } catch (IOException e) {
            throw new RuntimeException("Failed to load stylesheet: " + stylesheetResource, e);
        }

        return CacheKey.build(stylesheetResource.getDescription(), stylesheetCacheKey);
    }
547357
private String getKey(Object key) {
        if (key == null) {
            throw new IllegalArgumentException("Cache key not be null");
        }

        return ObjectUtils.toString(key);
    }
668762
private CacheKeyTO getCacheKey(CacheAopProxyChain pjp, Object[] arguments, ExCache exCache, Object result) {
        Object target = pjp.getTarget();
        String methodName = pjp.getMethod().getName();
        String keyExpression = exCache.key();
        if (null == keyExpression || keyExpression.trim().length() == 0) {
            return null;
        }
        String hfieldExpression = exCache.hfield();
        return getCacheKey(target, methodName, arguments, keyExpression, hfieldExpression, result, true);
    }
1145397
protected final String toKey(String cacheKey) {
        if (isUsingKeySanitizer()) {
            try {
                return (String) keySanitizer.sanitizeKey(cacheKey);
            } catch (KeySanitationExcepion e) {
                Ln.e(e, "Key could not be sanitized, falling back on original key.");
                return cacheKey;
            }
        } else {
            return cacheKey;
        }
    }
66292
def get_cache_key(self, section, name):
        """"""
        if not self.instance:
            return 'dynamic_preferences_{0}_{1}_{2}'.format(self.model.__name__, section, name)
        return 'dynamic_preferences_{0}_{1}_{2}_{3}'.format(self.model.__name__, self.instance.pk, section, name, self.instance.pk)
646301
public String getListCacheKey() {
		Object table = getLookupTable();

		if (table != null && ConfigurationProperties.getDatalistCaching()) {
			String key = APPLICATION_LOOKUP_TABLE.getCacheKeyForTable(table);
			return key;
		}

		return null;
	}
204168
def cache_key(self, request, method=None):
        

        if method is None:
            method = request.method
        return "bettercache_page:%s:%s" %(request.build_absolute_uri(), method)
690754
public T get(K key) {
        T item = cache.get(key);
        if (item == null) {
            item = buildAndCache(key, crestConfig);
        }
        return item;
    }
1088981
@Override
	public String getCacheKeyForJwtSSOToken(Subject subject, String encodedjwt) {
		// TODO Auto-generated method stub
		if (encodedjwt != null) {
			return HashUtils.digest(encodedjwt);
		} else if (subject != null) {
			String jwtssotoken = getJwtSSOToken(subject);
			if (jwtssotoken != null) {
				return HashUtils.digest(jwtssotoken);
			}
		}

		return null;
	}
903855
public JSPCache getJSPCache(String cacheName) throws DynamicCacheServiceNotStarted, IllegalStateException {
    	if (servletCacheUnit == null) {
    		throw new DynamicCacheServiceNotStarted("Servlet cache service has not been started."); 
    	}
    	return  servletCacheUnit.getJSPCache(cacheName);
	}
605878
@Trivial
    public static DCache getCache(String cacheName) {

        final String methodName = "getCache()";
        DCache cacheOut = ServerCache.cache;

        if (cacheName != null) {
            cacheName = normalizeCacheName(cacheName, null);
        }

        if (cacheName != null && !cacheName.equalsIgnoreCase(DCacheBase.DEFAULT_CACHE_NAME)) {
            cacheOut = cacheInstances.get(cacheName);
        }

        if (cacheOut == null && TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, methodName + " could not find cache for cacheName=" + cacheName);
        }

        return cacheOut;
    }
169815
private String getCacheKey(String[] keys, CmsDbContext dbc) {

        if (!dbc.getProjectId().isNullUUID()) {
            return "";
        }
        StringBuffer b = new StringBuffer(64);
        int len = keys.length;
        if (len > 0) {
            for (int i = 0; i < len; i++) {
                b.append(keys[i]);
                b.append('_');
            }
        }
        if (dbc.currentProject().isOnlineProject()) {
            b.append("+");
        } else {
            b.append("-");
        }
        return b.toString();
    }
946576
public S getSchemaByKey(K key) throws SchemaRegistryException {
    try {
      return cachedSchemasByKeys.get(key);
    } catch (ExecutionException e) {
      throw new SchemaRegistryException(String.format("Schema with key %s cannot be retrieved", key), e);
    }
  }
328820
@Override
    public final CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
        final CacheKeyBuilder<String, String> cacheKeyBuilder = CacheKey.builder(getName());

        final PreferencesScope stylesheetPreferencesScope =
                this.getStylesheetPreferencesScope(request);

        this.stylesheetUserPreferencesService.populateStylesheetParameters(
                request, stylesheetPreferencesScope, cacheKeyBuilder);

        this.stylesheetUserPreferencesService.populateOutputProperties(
                request, stylesheetPreferencesScope, cacheKeyBuilder);

        return cacheKeyBuilder.build();
    }
290097
public CacheKeyTO getCacheKey(Object target, String methodName, Object[] arguments, String keyExpression,
                                  String hfieldExpression, Object result, boolean hasRetVal) {
        String key = null;
        String hfield = null;
        if (null != keyExpression && keyExpression.trim().length() > 0) {
            try {
                key = scriptParser.getDefinedCacheKey(keyExpression, target, arguments, result, hasRetVal);
                if (null != hfieldExpression && hfieldExpression.trim().length() > 0) {
                    hfield = scriptParser.getDefinedCacheKey(hfieldExpression, target, arguments, result, hasRetVal);
                }
            } catch (Exception ex) {
                log.error(ex.getMessage(), ex);
            }
        } else {
            key = CacheUtil.getDefaultCacheKey(target.getClass().getName(), methodName, arguments);
        }
        if (null == key || key.trim().isEmpty()) {
            throw new IllegalArgumentException("cache key for " + target.getClass().getName() + "." + methodName + " is empty");
        }
        return new CacheKeyTO(config.getNamespace(), key, hfield);
    }
184463
public Object getCache(Object dataKey, String modelClassName) {
		CacheKey cachKey = cacheKeyFactory.createCacheKey(dataKey.toString(), modelClassName);
		return getModelFromCache(cachKey);
	}
1372667
@Nullable
  public CloseableReference<CloseableImage> getCachedImage(@Nullable CacheKey cacheKey) {
    MemoryCache<CacheKey, CloseableImage> memoryCache = mBitmapMemoryCache;
    if (memoryCache == null || cacheKey == null) {
      return null;
    }
    CloseableReference<CloseableImage> closeableImage = memoryCache.get(cacheKey);
    if (closeableImage != null && !closeableImage.get().getQualityInfo().isOfFullQuality()) {
      closeableImage.close();
      return null;
    }
    return closeableImage;
  }