6 Replies Latest reply on Nov 15, 2011 5:21 PM by Zev.Arnold@Wipro

    AF Caching Time-outs, Refreshing AF Attributes, and Caching Refresh Concurrency Issues

    Zev.Arnold@Wipro

      Here's the scenario (simplified for digestion):

      I have an AF Element under which are several AF Attributes.  In my application, I have one thread running per AF Attribute echoing the value to the screen at periodic intervals.  I have another thread that accepts requests to refresh the AF Database so that I can capture changes, i.e. new AF Attributes, deleted AF Attributes, and updates to the configuration of the AF Attribute Data References, e.g. PI tag change.

      Problem 1:

       

      I don't want the AF Cache to time-out and refresh any cached AF Objects; rather I want to force refreshes manually ONLY.  Can I set the CacheTime property of the AF Cache to infinity?

       

      Problem 2:

       

      I'd rather not refresh more objects than I have to.  If I know that only one AF Attribute has been edited, I would prefer to only update that AF Attribute.  I noticed that AF Element objects have a Refresh method that will allow you to force a manual refresh for that object only.  Is there a similar functionality for AF Attributes?

       

      Problem 3:

       

      Do I need to worry about concurrency issues by updating the AF Element/AF Attribute objects from one thread while accessing those same objects from the other threads?

       

      Thanks!