Dispatcher cache - Backend forbids caching | Community
Skip to main content
February 4, 2021
Solved

Dispatcher cache - Backend forbids caching

  • February 4, 2021
  • 2 replies
  • 1670 views

Dispatcher is not able to cache some of the pages. We noticed that dispatcher is logging the below log whenever this happens:

"Backend forbids caching, sent: 'Cache-Control: private'"

 

Any idea what may be happening here? We are not adding any response header on AEM publish server. I checked the

org.eclipse.jetty.server.HttpChannel logs as well and 'Cache-Control' header is not part of AEM response. Also verified by hitting the publish server directly using the browser.

 

Any pointers would be appreciated !

 

----------------------------------------

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: Host

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: Accept

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: User-Agent

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: Accept-Language

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: Referer

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: Accept-Encoding

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: X-Dispatcher-Server

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: Via

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: X-Forwarded-For

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: X-Forwarded-SSL

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: X-Forwarded-SSL-Cipher

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: X-Forwarded-SSL-Session-ID

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Adding request header: Server-Agent

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] Backend forbids caching, sent: 'Cache-Control: private'

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] response.status = 200

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] response.headers[Date] = "Sat, 30 Jan 2021 00:27:39 GMT"

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] response.headers[X-Content-Type-Options] = "nosniff"

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] response.headers[X-Frame-Options] = "SAMEORIGIN"

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] response.headers[Content-Type] = "text/html;charset=utf-8"

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] response.headers[Cache-Control] = "private"

[Fri Jan 29 19:27:39 2021] [D] [pid 26302] response.headers[Content-Encoding] = "gzip"

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Umesh_Thakur

@ak31270718,

If your publisher is responding a content with "Cache-Control: private" it simply means that the resource is user specific and will not be cached on the dispatcher or any CDN but on user's browser.

it seems this header is only is saying dispatcher not the cache the content and this why you are getting "Backend forbids caching" error message.

So to overcome this you need to fix it from AEM level.

 

Hope this will help.

Umesh Thakur

2 replies

Umesh_Thakur
Community Advisor
Umesh_ThakurCommunity AdvisorAccepted solution
Community Advisor
February 4, 2021

@ak31270718,

If your publisher is responding a content with "Cache-Control: private" it simply means that the resource is user specific and will not be cached on the dispatcher or any CDN but on user's browser.

it seems this header is only is saying dispatcher not the cache the content and this why you are getting "Backend forbids caching" error message.

So to overcome this you need to fix it from AEM level.

 

Hope this will help.

Umesh Thakur

February 4, 2021
@umesh_thakur : I verified AEM publish response and Cache-Control is not part of headers. I checked the logs after putting 'org.eclipse.jetty.server.HttpChannel' in debug mode and also verified by hitting AEM node directly over browser. Any other way to verify/confirm that AEM is adding that header?
Shubham_borole
Community Advisor
Community Advisor
February 4, 2021

Hi,

 

It seems that cache control for the particular content area is set to private. Can you check in your aem code AND Dispatcher configs for 'Cache-Control “private”' ?