Sample code for 30+ languages & platforms
Lua

Example: Http.GetCacheRoot method

Demonstrates the GetCacheRoot method.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

local http = chilkat.Http.new()

-- Establish 2 cache root directories.
http:add_cache_root("c:/example/httpCacheA/")
http:add_cache_root("c:/example/httpCacheB/")

print("Number of cache roots: " .. http.num_cache_roots)

print("1st cache root: " .. http:get_cache_root(0))
print("2nd cache root: " .. http:get_cache_root(1))

-- Output:

-- Number of cache roots: 2
-- 1st cache root: c:/example/httpCacheA/
-- 2nd cache root: c:/example/httpCacheB/