I am just confused and wanted to understand why Hugo is behaving in this way.
Let’s say we have a CSS builder partial which does resources.PostProcess on the CSS file it is fed. If I call that partial with partialCached, then my HTML is injected with a placeholder URL for the CSS, rather than the actual URL. Is this an expected behaviour?
Your post does not give enough information as to tell why it behaves the way it does, but in general:
The resources.PostProcess is already cached, so double caching it does not make it faster.
There are some known limitations so resources.PostProcess (you may have stumbled upon one), so if removing the cache, then I suggest you do it.
We have a proposal about a new defer template keyword that would solve all of this, but it’s non-trivial to implement and have not been on my priority list.
Note that postCSS is only invoked in a production environment (i.e., when you run hugo). You cannot currently use resources.PostProcess with partialCached when running hugo server. If you do, you’ll see placeholders. For example: