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

Command icon 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

    christophweber created an issue. See original summary.

    • i'mbatman committed a7b2832c on 1.0.x
      Issue #3512598: Make MD output cacheable
      
      Updated the Markdownify module...
    imbatman’s picture

    This 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!

    imbatman’s picture

    Status: Active » Fixed
    christophweber’s picture

    Status: Fixed » Closed (fixed)

    Works as expected with internal Drupal cache, external proxies, and browser cache.

    greggles’s picture

    This 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."