Author: lektran
Date: Mon Mar 22 23:11:24 2010
New Revision: 926390
URL:
http://svn.apache.org/viewvc?rev=926390&view=revLog:
Add some more cache usage when verifying the content to be rendered.
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java?rev=926390&r1=926389&r2=926390&view=diff==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java Mon Mar 22 23:11:24 2010
@@ -353,14 +353,14 @@ public class CmsEvents {
}
protected static int verifySubContent(Delegator delegator, String contentId, String contentIdFrom) throws GeneralException {
- List<GenericValue> contentAssoc = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId", contentIdFrom, "contentIdTo", contentId, "contentAssocTypeId", "SUB_CONTENT"));
+ List<GenericValue> contentAssoc = delegator.findByAndCache("ContentAssoc", UtilMisc.toMap("contentId", contentIdFrom, "contentIdTo", contentId, "contentAssocTypeId", "SUB_CONTENT"));
boolean hadContent = false;
if (UtilValidate.isNotEmpty(contentAssoc)) {
hadContent = true;
}
contentAssoc = EntityUtil.filterByDate(contentAssoc);
if (UtilValidate.isEmpty(contentAssoc)) {
- List<GenericValue> assocs = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId", contentIdFrom));
+ List<GenericValue> assocs = delegator.findByAndCache("ContentAssoc", UtilMisc.toMap("contentId", contentIdFrom));
assocs = EntityUtil.filterByDate(assocs);
if (assocs != null) {
for (GenericValue assoc : assocs) {