Use this function (usually at the beginning of your script - Init transaction) to enable the emulation of the cache size limit similar to IE. When you specify this function Silk Performer's cache manager will automatically remove entries out of the cache when the cache size gets larger than the specified value of fMaxSize according to IE's caching strategy.
WebApi.bdh
WebSetCacheLimitIE( in fMaxSize : float );
Parameter | Description |
---|---|
fMaxSize | Cache limit in MB. |
dcltrans transaction TInit begin WebSetCacheLimitIE(1.0); end TInit; transaction TWeb begin WebPageUrl("http://lab3/stadyn_file500k.html"); print(string(WebCacheGetSize())); Wait 180.0; WebPageUrl("http://lab3/stadyn_file500k.html?x=1"); print(string(WebCacheGetSize())); Wait 180.0; WebPageUrl("http://lab3/stadyn_file500k.html?x=2"); print(string(WebCacheGetSize())); Wait 180.0; WebPageUrl("http://lab3/stadyn_file500k.html?x=3"); print(string(WebCacheGetSize())); Wait 180.0; WebPageUrl("http://lab3/stadyn_file500k.html?x=4"); print(string(WebCacheGetSize())); end TWeb;
512000 1024000 1536000 2048000 2048000