Vishwa Bhat
Vishwa Bhat

Reputation: 87

Dynacache - Caching everything

I have taken over an application that serves around 180 TPS. The responses are always SOAP XML responses with a size of around 24000 bytes. We have been told that we have a dynacache and i can see that we have a cachespec.xml. But I am unable to understand how many entries it holds currently and its max limit.

  1. How can i check this? I have tried DynamicCacheAccessor.getDistributedMap().size() but this always returns 0.
  2. We have a lot of data inconsistencies because of Java hashmap caching layers internally. What are your thoughts on increasing dynacache and eliminate the internal caching ? How much server memory might this consume ?

Thanks in advance

Upvotes: 0

Views: 230

Answers (1)

Kevin Ortega
Kevin Ortega

Reputation: 46

The DynamicCacheAccessor accesses the default servlet cache instance, baseCache. If size() always returns zero then your cachespec.xml is configured to use a different cache instance.

Look for a directive in the cachespec.xml: <cache-instance name="cache_instance_name"></cache-instance> to determine what cache instance you are using.

Also install the Cache Monitor from the installableApps directory. See Monitoring and CacheMonitor. The Cache Monitor is an invaluable tool when developing/maintaining an app using servlet caching.

Using liberty, install the webCacheMonitor-1.0 feature.

Upvotes: 1

Related Questions