<p>I am trying to cache response of my API but I am getting <code>X-Cache-Status: MISS</code> every time. My Api return a text/plain response('hello' &amp; 'bye').
I don't know what I am missing, also the setup is on minikube.</p>
<p>My Ingress.yaml</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test
  labels:
    name: test
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/cache-enable: &quot;true&quot;
    nginx.ingress.kubernetes.io/proxy-buffering: &quot;on&quot;  
    nginx.ingress.kubernetes.io/configuration-snippet: |
      proxy_cache mycache;
      proxy_cache_valid 404 5m;
      proxy_ignore_headers Cache-Control;
      add_header X-Cache-Status $upstream_cache_status;
spec:
  rules:
  - host: myhost.local
    http:
      paths:
        - path: /hello
          pathType: Prefix
          backend:
            service:
              name: hello-api
              port:
                number: 8080
        - path: /bye
          pathType: Prefix
          backend:
            service: bye
              name: bye-api
              port:
                number: 8081
</code></pre>
<p>ingress config map</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: ingress-nginx-controller
  namespace: ingress-nginx
data:
  http-snippet: &quot;proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=mycache:10m use_temp_path=off max_size=4g inactive=60m;&quot;
</code></pre>
<p>For some reason <code>Cache-Control</code> is set to <code>Private</code>.</p>
<p>I tried solutions mentioned here, but no success.</p>
<p><a href="https://stackoverflow.com/questions/66280437/how-to-properly-configure-ingress-cache-to-get-it-working">How to properly configure ingress cache to get it working?</a></p>
<p><a href="https://stackoverflow.com/questions/62245119/ingress-nginx-cache">Ingress nginx cache</a></p>

Alan
<p>show kubectl -n <em>ingresscontrollernamespace</em> describe pod <em>ingresscontrollerpodname</em></p>
<p><a href="https://kubernetes.slack.com/archives/CANQGM8BA/p1654524670938769" rel="nofollow noreferrer">https://kubernetes.slack.com/archives/CANQGM8BA/p1654524670938769</a></p>
