JavaScript
JavaScript
Example: Http.GetCacheRoot method
Demonstrates theGetCacheRoot method.
Note
This example is intended for running within a Chilkat.Js embedded JavaScript engine. All Chilkat JavaScript examples require Chilkat
v11.4.0 or greater.
var http = new CkHttp();
// Establish 2 cache root directories.
http.AddCacheRoot("c:/example/httpCacheA/");
http.AddCacheRoot("c:/example/httpCacheB/");
console.log("Number of cache roots: " + http.NumCacheRoots);
console.log("1st cache root: " + http.GetCacheRoot(0));
console.log("2nd cache root: " + http.GetCacheRoot(1));
// Output:
// Number of cache roots: 2
// 1st cache root: c:/example/httpCacheA/
// 2nd cache root: c:/example/httpCacheB/