> On Feb 16, 2021, at 5:37 PM, Milos Dodic <[email protected]> wrote:
>
> Basic caching setup?
>
>
> I am trying to have the most basic caching setup for a forward caching proxy.
> Initially I tried changing the following options only:
>
> CONFIG proxy.config.http.cache.http INT 1
> CONFIG proxy.config.reverse_proxy.enabled INT 0
> CONFIG proxy.config.url_remap.remap_required INT 0
>
> I had no luck. After trying out a few things, I ended with something like
> this:
>
> CONFIG proxy.config.http.cache.http INT 1
> CONFIG proxy.config.reverse_proxy.enabled INT 0
> CONFIG proxy.config.url_remap.remap_required INT 0
> CONFIG proxy.config.http.cache.ignore_client_no_cache INT 1
> CONFIG proxy.config.http.cache.ignore_server_no_cache INT 1
> CONFIG proxy.config.http.cache.ignore_authentication INT 1
> CONFIG proxy.config.http.cache.cache_urls_that_look_dynamic INT 1
> CONFIG proxy.config.http.uncacheable_requests_bypass_parent INT 1
> CONFIG proxy.config.http.cache.required_headers INT X (tried 0,1 and 2)
> CONFIG proxy.config.http.push_method_enabled INT 1
>
> Again, no luck. All I got was lots of MISS, and nothing was cached.
> I tried to cache by using the custom app with a forward proxy set to target
> the ATS, and later by simply trying to curl na object from AWS S3 (https). In
> the end, I brought up an Apache web server, and tried curling the basic http
> index page. Still, nothing was cached.
Odds are that your “origin” is not sending appropriate Cache-Control headers.
Even the default storage.config should have a small cache. HTTPD (Apache) would
by default not send any cache-control headers. If you don’t want to change
that, you can set
CONFIG proxy.config.http.cache.required_headers INT 1 # Or 0, but that’s
kinda crazy in general
Also, from your above config, this is almost always a bad idea (it becomes an
open proxy at this point):
CONFIG proxy.config.url_remap.remap_required INT 0
— Leif
>
> How can I have the most basic setup in place (at least for now), that will
> cache stuff like me pulling the index page from the apache web server? Or
> cache everything even?
> What am I missing?
>
>
> Thanks!