Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Dispatcher cache - Backend forbids caching

Avatar

Avatar
Level 1
ak31270718
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
ak31270718
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
ak31270718
Level 1

03-02-2021

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"

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

147 likes

Total Posts

157 posts

Correct Reply

53 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

147 likes

Total Posts

157 posts

Correct Reply

53 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile
Umesh_Thakur
MVP

03-02-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

Answers (1)

Answers (1)

Avatar

Avatar
Springboard
Level 5
snbaem
Level 5

Likes

86 likes

Total Posts

212 posts

Correct Reply

27 solutions
Top badges earned
Springboard
Establish
Validate 25
Validate 10
Validate 1
View profile

Avatar
Springboard
Level 5
snbaem
Level 5

Likes

86 likes

Total Posts

212 posts

Correct Reply

27 solutions
Top badges earned
Springboard
Establish
Validate 25
Validate 10
Validate 1
View profile
snbaem
Level 5

04-02-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”' ?