I have a problem with my Liferay Cache.
Scenario :
I am reading an XML file and importing layouts to my Liferay DB using Liferay API.
There is huge data being stored in the typeSettings column of the layout.
Problem :
When I am importing around 5000 layouts, I get an OutofMemoryException.
I could find the most retained Heap Space is by the EhCache object.
(which holds the LayoutCacheModel with my huge typesettings)
Is it a good idea to clear the cache after each layout import ?
If so, how can I clear the cache specific to layouts. (I am using Liferay 6.0)
Thanks,
Siby
Similar to the answer given by @ramsinb I was able to clear the cache using code from :
LayoutPersistenceImpl.java
I had to manually copy this code as its not available as a service.