Invalidate cache header only for published posts

Closes #1563

- Add check for post.status === 'published'

I have a couple open questions about whether I'm even solving the right problem described in #1563, but just in case this is all that is necessary I'm gonna put it up here.