WebCacheGetSize Function

Action

Returns the actual size of the cache in bytes.

Include file

WebApi.bdh

Syntax

WebCacheGetSize(): number;

Return value

Actual size of the cache.

Example

dcltrans
  transaction TWeb
  begin
    WebPageUrl("http://lab3/stadyn_file500k.html");
    writeln(WebCacheGetSize());
    WebPageUrl("http://lab3/stadyn_file500k.html?x=1");
    writeln(WebCacheGetSize());
    WebPageUrl("http://lab3/stadyn_file50k.html");
    writeln(WebCacheGetSize());
    WebPageUrl("http://lab3/stadyn_file50k.html?x=1");
    writeln(WebCacheGetSize());
    WebPageUrl("http://lab3/stadyn_file5k.html");
    writeln(WebCacheGetSize());
  end TWeb;

Output

512000
1024000
1075200
1126400
1131520