Dispatcher is not forwarding Last-Modified header when caching is disabled | Community
Skip to main content
schwabix
New Participant
Nov 22, 2017 9:29 AM UTC
Solved

Dispatcher is not forwarding Last-Modified header when caching is disabled

In our setup Dispatcher is not used for caching - this is done by Varnish that sits in front of Dispatcher.

For cache invalidation we need the Last-Modified header that is returned by AEM Publisher, but Dispatcher is removing the header line.

Is there a way to instruct Dispatcher to just forward the Last-Modifed header that is returned by AEM Publisher?

thx Michael

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Employee
Nov 23, 2017 7:52 AM UTC

When the file is deliverd out of the dispatcher cache without the header-caching being active, the last-modification time is taken from the mtime of the cache file.

To get the mtime of the AEM publish instance, enable dispatcher header caching; yesterday there was a AEM Gems session on dispatcher where it was mentioned. I hope that Dispatcher - New features and best practices  will be updated today.

Jörg

5 replies

15473203
Level 2
Feb 17, 2018 6:32 AM UTC

I'm having a similar issue. I'm using Dispatcher 4.2.3 and caching the response headers, but when a cached dam asset is returned, the cached header value is not used, the last modified time of the actual cached file is still used. Any ideas? /clientheaders allows all headers.

Translate
schwabix
schwabixAuthor
New Participant
Nov 23, 2017 3:46 PM UTC

Thank you for your answers, but our issue was with uncached urls, so activating header caching was not feasible.

This was actually a known issue with Dispatcher 4.2.2 - Daycare support just send me info on this.

DISP-676 - Dispatcher removes Last-Modified header for uncached requests

They also provided a pre-release version of Dispatcher 4.2.3 that solves our issue.

Thx again for warm welcome on this forum

Best regards

Michael

Translate
joerghoh
joerghohAccepted solution
Employee
Nov 23, 2017 7:52 AM UTC

When the file is deliverd out of the dispatcher cache without the header-caching being active, the last-modification time is taken from the mtime of the cache file.

To get the mtime of the AEM publish instance, enable dispatcher header caching; yesterday there was a AEM Gems session on dispatcher where it was mentioned. I hope that Dispatcher - New features and best practices  will be updated today.

Jörg

Translate
kautuk_sahni
Employee
Nov 23, 2017 7:48 AM UTC

Jörg Hoh​ Can you please look at this one?

Translate
Kautuk Sahni
smacdonald2008
Level 10
Nov 23, 2017 12:08 AM UTC

Make sure that Last-Modified header is allowed by the /clientheaders section of the dispatcher farm.

Translate