Enabling caching of objects should not enable it for all entities

Description

We have an application with thousands of entities, out of which about 100 are meant to store static or reference data while the others are purely transactional in nature and change too frequently. There is a strong business case to cache objects of static or reference types but not of the transactional type.

Before we started using AndroMDA, we were already using HIBERNATE and EHCACHE and had caching enabled for individual classes where caching was required. After moving to AndroMDA we have discovered that it isn't possible to turn caching on for individual objects. This is quite painful for us as right now we desperately need caching but turning it on forces entries for all entities into the ehcache.xml file although we do not want that behaviour.

My suggestion is that besides the property that controls caching in the Namespace, another property be added to the Profile that will allow us to control caching of individual entities through the tagged values. An entry should be made to ehcache.xml only if the property is set both in the namespace and the profile for an entity.

Right now I have specified cache-type=none in andromda.xml and then overridden it in tagged values for the entities where I need caching. I have also modified the cartridge locally to check whether cache-type is set to something other than none and only then generate a cache entry for that entity.

Environment

None

Assignee

Former user

Reporter

Manish Baxi

Labels

None

Components

Affects versions

Priority

Critical
Configure