Smaller the size of the cache and more tuned to your working set, the better performance you will get. (Smaller footprint, better concurrency etc ... )
Q Should we still avoid timeouts as our invalidation policy if at all possible?
Absolutely. Explicitly invalidating the cache-entries brings down the cache size immediately and prevents LRU activity.
Q Our application's usage is currently assigning a fixed default "Priority" for each-and-every item placed in the Cache using the DynaCache API (using timeouts as our invalidation policy).
This is fairly normal. Priorities are typically used when there are different classes of cached items some more important than others. Lower priority cache entries are considered first when it comes to making room in the cache.
Q Default priority for each Cache item. Admin versus API... what wins?
Dynacache API priority overrides priority set on the admin console. Priority determines how many cycles in the clock algorithm must pass before an unused entry is chosen as a victim. Each entry's clock starts with the default or value set programatically/cachespec,xml and is decremented each clock cycle. A clock value of <= 0 implies a victim candidate. The default is 1.
I would keep the default priority of entries as 1 and only set higher priority for those entries that are more important than the rest.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.