0

I have set the kbmMWUNIDACConnectionPool properties as this on the Server-side:

kbmMWUNIDACConnectionPool1.EnableCache := True;
kbmMWUNIDACConnectionPool1.MaxCacheAge := 30;
kbmMWUNIDACConnectionPool1.MaxCacheEntries := 100;
kbmMWUNIDACConnectionPool1.MaxCacheRecordCount := 10000;

But,I find the cache functions is not effectively,Please look the Unidac Monitor screenshot:

enter image description here

It's the same query statement,but the server-side ask the database everytime!Why? In a word: How to use the cache functions correctly ? Thanks in advance! :)

PFeng
  • 101
  • 1
  • 13

1 Answers1

4

You need to enable that the query statement should be cached (Cached property of the xxxquery component) and how it should be cached, (CacheFlags on the same component).

CacheFlags can be

  • mwcfDontAge - The cache entry do not expire and will stay in cache
  • mwcfDontGarbageCollect - The cache entry will never be garbage collected (effect is similar to dont age)
  • mwcfDefsOnly - Only definition for query (fielddefs and parameter definitions) will be cached.
  • mwcfUpdateOnResolve - If resolved, cache entry will be updated with new data and field/paramdefs.
  • mwcfLeaveOnResolve - If resolved, cache entry will be deleted.
  • mwcfNoParamsInCacheID - Dont store parameter contents as part of the cache ID (hence different parametervalues result in the same cache entry)
  • mwcfIgnoreCachedParams - No in use.
LU RD
  • 34,438
  • 5
  • 88
  • 296
Kim Madsen
  • 162
  • 1
  • Thank you! @KimMadsen ,should i setting the client-side component any properties at the same time? – PFeng Apr 26 '12 at 01:43
  • Follow your suggest,The client-side have no problem now! Thanks! But the server-side still doesn't have any effect :( – PFeng Apr 26 '12 at 08:45
  • You have the same options on the server. The client have a connection pool towards the app server. It can cache those values. The same the app server have towards the database. If you enable cache on those, set relevant caching properties and define on the query components (client and server side) that they should operate cached, it will do that. Remember to cache something, it will first have to do the full operation. Only later requests can benefit from the caching. – Kim Madsen Apr 26 '12 at 13:32