Files
ofbiz-framework/applications
Jacques Le Roux 7a0eab8cdf A modified patch from Ritu Raj Lakhera for "Enhancement in the content wrappers" https://issues.apache.org/jira/browse/OFBIZ-6701
Some enhancements in the content wrapper JAVA classes. We used these enhancements in our project and observed good change in website performance. 

1. If content is empty string or null then method 'get*ContentAsText' are not caching the result. 
And thus every time this method is making SQL call even no content in database. Method should cache the empty string and null as result.
2. Overloaded method 'get*ContentAsText' is also using cache method of Delegator for '*Content' entity selection and passing 'true' to use cache for '*Worker.renderContentAsText' method. This approach is making unnecessary copies of cache for content.
	I Content wrapper cache
	II *Content entity cache
	III Content, Dataresource, ElectrocText and etc... entities cache(ContentWorker.renderContentAsText)

If I again call the 'get*ContentAsText' method then this will return the result from content wrapper cache. So there is no use of *Content, Content, Dataresource and ElectrocText cache. And these cache also filling the memory of application.



jleroux: Ritu Raj initially provided the changes only for the product content wrapper saying "We also applied the same logic for category content wrapper." I asked him if he could provide a patch for all content wrappers. I completed the parts for Category and Workeffort content wrapper which missed some lines.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1711578 13f79535-47bb-0310-9956-ffa450edef68
2015-10-31 05:39:13 +00:00
..
2015-10-28 14:13:00 +00:00