(Delphi ActiveX) Example: Http.GetCacheRoot method
Demonstrates the GetCacheRoot method.
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;
...
procedure TForm1.Button1Click(Sender: TObject);
var
http: TChilkatHttp;
begin
http := TChilkatHttp.Create(Self);
// Establish 2 cache root directories.
http.AddCacheRoot('c:/example/httpCacheA/');
http.AddCacheRoot('c:/example/httpCacheB/');
Memo1.Lines.Add('Number of cache roots: ' + IntToStr(http.NumCacheRoots));
Memo1.Lines.Add('1st cache root: ' + http.GetCacheRoot(0));
Memo1.Lines.Add('2nd cache root: ' + http.GetCacheRoot(1));
// Output:
// Number of cache roots: 2
// 1st cache root: c:/example/httpCacheA/
// 2nd cache root: c:/example/httpCacheB/
end;
|