Allow enabling status codes for caching header. Closes #1984