Problem/Motivation
MD output should be cached just like HTML.
Current cache headers:
cache-control: must-revalidate, no-cache, private
x-drupal-cache: UNCACHEABLE (no cacheability)
x-drupal-dynamic-cache: UNCACHEABLE (no cacheability)
Steps to reproduce
Request an MD page: https://mysite.com/node/19.md
Check response headers in devtools.
Proposed resolution
Set MD output to be cacheable.
Cache headers for anonymous users:
cache-control: max-age=86400, public
x-drupal-cache: HIT
x-drupal-dynamic-cache: HIT
Remaining tasks
User interface changes
none
API changes
tbd
Data model changes
tbd
Issue fork markdownify-3512598
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
imbatman commentedThis feature is now fully supported and introduced in Markdownify 1.0.0-rc6.
Thank you to everyone who contributed to the implementation of this module!
Comment #4
imbatman commentedComment #5
christophweber commentedWorks as expected with internal Drupal cache, external proxies, and browser cache.
Comment #6
gregglesThis feels like a great feature, thanks for adding it.
I think it would be helpful on the project page to mention that the markdownified content is cached to help people evaluate the module. Maybe in the introduction paragraph it could say "Content has appropriate cache headers to help reduce the load on the Drupal webserver."