HomePhabricator

Improve cache behaviors for font files and other nonstandard resource types

Description

Improve cache behaviors for font files and other nonstandard resource types

Summary:
Ref T10843. There are actually two separate notions of cacheability here:

  • Is this cacheable by the browser (e.g., should we emit "Expires: long in the future")?
  • Is this cacheable locally (e.g., should we stick it in APC, or just read it off disk every time)?

These got a little mixed up by D15775, so we aren't currently emitting proper "Expires" headers on font files and a few other resource types.

Straighten this out so that we "Expires" these unusual resources correctly.

Test Plan: Verified that .woff files get a proper "Expires" header now, not just CSS/JS.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10843

Differential Revision: https://secure.phabricator.com/D15807