[Zoo-discuss] Caching
Farkas H
farkas.dus at gmail.com
Mon Dec 17 09:31:04 PST 2012
Hi Gérald,
I do a little research on wps-caching.
Therefore I modified the kernel.
(1) added a function to forward href requests through a http-proxy,
(2) added the variable maxCachingTime; if the cache file is out of
date the cache file is deleted and the data is retrieved from the
origin server,
(3) added a simple caching log with the following elements:
date and time # elapsed time to get the data [milliseconds] # filesize
[Bytes] # status [HIT | MISS | REFRESH_MISS | DIRECT] # url
e.g.
17.12.2012 12:56:46 | 25 | 19245 | WFS_HIT |
http://...&Typename=topp:tasmania_water_bodies
(4) added the section [caching] to main.cfg with the following variables:
[caching]
method = ... - WPS_IN: href:Wfs-Data |
WPS_IN_AND_OUT: Wfs- und Wps-Data | PROXY: Proxy-Caching | NONE: no
Caching
maxCachingTime = [minutes] - maximum age in minutes; if the file
is out of date data is retrieved from the server
cacheDir = [drive and path] - caching directory
logDir = [drive and path] - log directory
proxyCache = [IP-address:port] - Caching-Proxy (method = PROXY)
Addionally I would like to add a functionality to cache http-Post
requests and the corresponding results. If http-Post requests are
identical available in the cache and the corresponding data is fresh
the response data could be provided directly from the cache.
I would appreciate some hints if the following scenario could work.
begin;
...
some existing code;
...
some new code;
if (adjusted (no blanks, no cr, ...) http-Post request is in cache and
the corresponding response is fresh) {
some new code;
...
call some existing functions to provide the corresponding response
in the requested kind;
end;
}
...
some existing code;
...
end;
Where should I integrate the new code?
Hope to hear from you.
Regards,
Farkas
More information about the Zoo-discuss
mailing list