Skip to content

Commit

Permalink
Improved: comments and code formatting, no functional changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrohl committed Feb 2, 2024
1 parent 625b80d commit 1d9df1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,12 @@ public static String getProductContentAsText(GenericValue product, String produc
/*
* Look for a previously cached entry (may also be an entry with null value if
* there was no content to retrieve) caching: there is one cache created,
* "product.content" Each product's content is cached with a key of
* "product.content.rendered" Each product's content is cached with a key of
* contentTypeId::locale::mimeType::productId, or whatever the CACHE_KEY_SEPARATOR is
* defined above to be.
*/
String cacheKey = productContentTypeId + CACHE_KEY_SEPARATOR + locale + CACHE_KEY_SEPARATOR + mimeTypeId + CACHE_KEY_SEPARATOR + product.get(
"productId") + CACHE_KEY_SEPARATOR
+ encoderType + CACHE_KEY_SEPARATOR + delegator;
String cacheKey = productContentTypeId + CACHE_KEY_SEPARATOR + locale + CACHE_KEY_SEPARATOR + mimeTypeId + CACHE_KEY_SEPARATOR
+ product.get("productId") + CACHE_KEY_SEPARATOR + encoderType + CACHE_KEY_SEPARATOR + delegator;
String cachedValue = PRODUCT_CONTENT_CACHE.get(cacheKey);
if (cachedValue != null || PRODUCT_CONTENT_CACHE.containsKey(cacheKey)) {
return cachedValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static String getProductPromoContentAsText(GenericValue productPromo, Str
/* Look for a previously cached entry (may also be an entry with null value if
* there was no content to retrieve)
*/
/* caching: there is one cache created, "product.promo.content" Each productPromo's content is cached with a key of
/* caching: there is one cache created, "product.promo.content.rendered" Each productPromo's content is cached with a key of
* contentTypeId::locale::mimeType::productPromoId, or whatever the CACHE_KEY_SEPARATOR is defined above to be.
*/
String cacheKey = productPromoContentTypeId + CACHE_KEY_SEPARATOR + locale + CACHE_KEY_SEPARATOR + mimeTypeId
Expand Down

0 comments on commit 1d9df1e

Please sign in to comment.