phpapachemime-typesmod-expires

Use apache mod_expires to cache php, what is a mime type for php files?


I want to cache php for few seconds in mod_expires, I can't find examples, nobody want to cache it (I know, I know).

What should I put into ExpiresByType to cache php?


Solution

  • Debian uses text/x-php. https://packages.debian.org/sid/mime-support

    The IANA suggests text/x-php or application/x-php. https://www.ietf.org/rfc/rfc4329.txt

    Please note that text/php or application/php probably won't work.