使用apache mod_expires来缓存php,什么是php文件的mime类型?

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?

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.

What should I put into ExpiresByType to cache php?

Whatever Content-Type your PHP scripts are generating. text/html if they're generating HTML pages, for instance.

A better option is usually to generate Expires headers in PHP code.