Code generation Cache Options - what behavior should I expect?

I’ve reviewed the forums and the closest item I can find to my issue is in the following URL related to Forcing Objects to reload.
http://forums.visual-paradigm.com/posts/list/995.html

Besides the evict method, I’m curious to know more about the intended outcome of selecting different Cache options on code generation.

I’m using VP DBA for .NET, generating C# code off an ERD.
In the product documentation the screen for setting Cache Options is not included. (screenshot attached)

Any information to help answer these questions would be much appreciated:
What is the intended outcome of setting Expiration to zero?
(does this disable session caching, so I don’t need to use the evict method on specific objects?)

What is the intended outcome of setting the Priority?
(Is 1 the highest priority? What behavior is this intended to influence?)

If I set Relative Expiration to zero seconds, and then drill down to the ‘Classes Cache Confuration’ screen and change the default from disable to another level, can I still have different caching behavior for different classes?


DBANET_cacheScreen.jpg

Update:

While waiting to understand the relative = zero and other answers I’ve run through and tried the following which initial testing appears to be helping on my asp.net app:

  1. set caching option to SysCache
  2. checkbox “on” for use relative cache
  3. set relative seconds to zero, priority to 1
  4. click the class specific caching button, and apply a mix of read-write settings (on my objects that change) and read-only on my objects that hold static lists, etc.
  5. regenerate code and test the app again. So far (light testing) it looks like some of the delays I was seeing for the UI to update with changes are gone. (fingers crossed that further testing will confirm this, and that I haven’t done something that will cripple my app performance)

-LW

Dear LW,

As I know we just generate the setting to App.config only, and will not perform any other specific task. You may reference to the SysCache in NHibernate for more details:
http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html_single/#NHibernate.Caches.SysCache2

relativeExpiration
=> Number of seconds that an individual item will exist in the cache before being removed.

priority
=> System.Web.Caching.CacheItemPriority that identifies the relative priority of items stored in the cache.

Hope this helps.

Best regards,
Jick

Hi Jick,
Thank you for the link to additional information, I found this helpful.

I would further recommend to your team to add a reference to this URL in both the product documentation section on the wizards area describing code generation, and (ideally) also put the URL link right on the Cache Options screen as a help reference.

Thanks again
LW

Hi LW,

Sounds good. I will forwarded your suggestion to our team for further studies.

Best regards,
Jick

Hi LW,

We now show tooltip with the description of fields. I hope you’ll find it helpful.

Best regards,
Jick

tooltip.png