You shouldn't need that configuration on the private network - the cache TTL is set when the object is cached, not when it is accessed. I would think you'd want that on the caching TS that is doing the preloaded.
For the 404, you might need to write a plugin (in C or Lua) that sits on the TS_HTTP_OS_DNS_HOOK and simply sets a 404 status for the response. DNS lookup isn't done if there is a cache hit. On Tue, Apr 23, 2019 at 9:01 PM Guofeng Zhang <[email protected]> wrote: > Hi, > > I need to provide a way for our machines on a private network to download > software somewhere. This private network has no internet connection. I > think this is can be easily accomplished by using TS as a forward proxy > server on the private network. > > I can fill the TS's cache by running a script on another machine that has > internet connection to download and cache software by a TS, then copy the > TS's cache directory (which is configured by storage.config) to the TS on > the private network. > > I need the TS on the private network to return objects if they are hit, or > return 404 (Not Found) if they are missed, and the TS should not try to > connect to original servers in any case. > > By reading the docs, I cannot know how to configure TS on the private > network. I think I can configure it like: > url_regex=^https?://(www.)?apache.org/dev/ ttl-in-cache=6h > and give ttl-in-cache a very large value. Is it the only configuration to > do it? > > Your help is appreciated. > > Thanks for your help. > > Guofeng > >
