Sunil S. Ranka's Weblog

Superior Data Analytics is the antidote to Business Failure

How does SAW cache work ?

Posted by sranka on September 25, 2010

Hi All

Came across an interesting problem recently. The issue was when reports were generating the same logical SQL, inspite of NO cache setting the results were cached. All the setting  CacheMinUserExpireMinutes, CacheMinExpireMinutes,  CacheMaxEntries in instanceConfig.xml were set to 0 (zero).

After debugging the issue it was nail down to an interesting fact that , if the same operation is done within an intervel of 30-38 sec, the results were getting refreshed. Following note from metalink made the finding more concrete.

Details on How does SAW Cache Work

The Analytics Engine uses the LRU algorithm (Least recently used) to clean out the cache entries. This works in conjunction with the parameter settings.

Anything that exists longer than CacheMaxExpireMinutes may and probably will be expired once the cleanup routine (which runs every minute or so) detects it. This is regardless of the CacheMinExpireMinutes setting.

When CacheMaxEntries is exceeded it will try to get rid of anything any entries with a time greater than CacheMinExpireMinutes (in LRU order though). In extreme cases it won’t even honour the CacheMinExpireMinutes setting.

The CacheMinUserExpireMinutes will generally keep a cache entry around for that # of minutes longer (even if CacheMinExpireMins or CacheMaxExpireMins have been exceeded). It’s user specific though in that other users will not use a cache entry that is being kept alive by another user if CacheMaxExpireMins has been exceeded.

Hope This Help

Sunil S Ranka

“Superior BI is the antidote to Business Failure”

Advertisements

One Response to “How does SAW cache work ?”

  1. […] How does SAW cache work ? […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: