AR System Mid-Tier cache invalidation and cache flush behavior explained.

View previous topic View next topic Go down

AR System Mid-Tier cache invalidation and cache flush behavior explained.

Post on Fri Jun 11, 2010 12:06 pm

AR System Mid-Tier 7.1.0 7.5.0

Perform check option:
-First we decide if for the interval cache invalidation does a update even need to be done. We look at last changed timestamp
from AR System's ServerInfo for last definition, user, and group changes timestamps. If we decide a cache update is needed
based on those timestamps we take the following actions.
-Record the current time at the start of the cache invalidation routine.
-Do the cache invalidation, basically flush everything.
-Once the cache invalidation is done get a new timestamp and subtract the starting timestamp from the current timestamp, which
gives us the duration of the the cache invalidation, so basically
finishtime – startime = duration of cache invalidation
-Next get the check interval value from mid-tier configuration, default is 3600 seconds, and then do this calculation:
invalidationinterval – duration = sleeptime
So, say the interval cache invalidation took 60 seconds and the cache invalidation interval is set to 3600 then after the
cache invalidation finished we would sleep for 3540 seconds before we do the next check for anything that requires us to flush
the cache. One exception to this is that if the sleeptime value we calculate arrived at by subtracting duration from invalidation
interval is less then 2000, then we always sleep for 2000 seconds. This is to prevent people putting in a cache check interval of
something like 300 seconds and spinning up the CPU. That way we’re guaranteed to sleep for at least approximately 30 minutes
before we do another check and possible cache flush.
Manual cache flush:
-When you push the Flush Cache button we stop the automated invalidation thread that used for the interval checks. We
are trying to prevent a scenario where you have a automated check about to happen in say 30 seconds, while you’re attempting a manual flush.
-Restart the reaper thread. We basically starting over on the interval.
-Remove the cache.
This means that if you pressed the Flush Cache button at 3:00 and your cache invalidation check is 3600 seconds, your next
automated cache invalidation check will still be at 4:00, if you pushed the Flush Cache at 3:30 you next interval check would be at
4:30, and so on.

Posts : 107
Points : 222
Reputation : 3
Join date : 2009-11-11

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum