Automattic / Automattic/jetpack

[Boost] When caching, support content types other than text/html

Open
#35,937 3 comments 0 reactions 0 assignees View on GitHub
[Boost Feature] Page Cache [Plugin] Boost [Status] Stale Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

We should support the most commonly used content types served by WordPress sites.

We currently support text/html, but we should add support for JSON data and even plain text. The data sent to a visitor should match what that visitor accepts. Some URLs can serve both HTML and JSON, depending on who is asking for the data.

The content type of the request could be encoded in the filename of the cache file, or as a separate "meta" file along with other headers and diagnostic information.

Contributor guide

Open the contributing guide

Research direction

Start by locating Boost's current text/html cache handling and how request content types are represented. Compare the proposed filename and separate-meta-file approaches, then define how content negotiation should select cached responses. Done means JSON and plain-text responses are cached and served according to what each visitor accepts.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.