/** * Sets the cache key for this response, which is calculated * from the provided parameters.<p> * * @param resourcename the target resource for which to create the cache key * @param cacheDirectives the cache directives of the resource (value of the property "cache") * @param online indicates if this resource is online or offline * * @return the generated cache key * * @throws CmsFlexCacheException in case the value String had a parse error */ CmsFlexCacheKey setCmsCacheKey(String resourcename, String cacheDirectives, boolean online) throws CmsFlexCacheException { m_key = new CmsFlexCacheKey(resourcename, cacheDirectives, online); if (m_key.hadParseError()) { // We throw the exception here to make sure this response has a valid key (cache=never) throw new CmsFlexCacheException(Messages.get().container( Messages.LOG_FLEXRESPONSE_PARSE_ERROR_IN_CACHE_KEY_2, cacheDirectives, resourcename)); } return m_key; }
/** * Sets the cache key for this response, which is calculated * from the provided parameters.<p> * * @param resourcename the target resource for which to create the cache key * @param cacheDirectives the cache directives of the resource (value of the property "cache") * @param online indicates if this resource is online or offline * * @return the generated cache key * * @throws CmsFlexCacheException in case the value String had a parse error */ CmsFlexCacheKey setCmsCacheKey(String resourcename, String cacheDirectives, boolean online) throws CmsFlexCacheException { m_key = new CmsFlexCacheKey(resourcename, cacheDirectives, online); if (m_key.hadParseError()) { // We throw the exception here to make sure this response has a valid key (cache=never) throw new CmsFlexCacheException( Messages.get().container( Messages.LOG_FLEXRESPONSE_PARSE_ERROR_IN_CACHE_KEY_2, cacheDirectives, resourcename)); } return m_key; }