Sage 9 Cache


#1

How does the Sage 9 cache supposed to work?

For example, in main.scss I added a sample code to change the body background colour to red, then run yarn build:production. In the dist folder it creates a main_abc123.css file. If I then change the body background colour to blue, and run yarn build:production again it regenerates the file, but the cache hash is still _abc123.css (or whatever the hash is).

I can only successfully get the hash to uniquely regenerate if I comment in/out the inclusion of a partial file. Even adding a simple css test, like the body background above, within these files (eg components/_buttons.scss) keeps the same hash code, even if I change background, font-size, text shadows, etc etc etc.

Am I missing something when trying to build a theme for deployment?

Cheers,
Dave


#2

Sounds like you’re running into https://github.com/roots/sage/issues/2017


#3

Thank you @benword for your help – You are indeed correct!

(Sorry for the delay – Been away! :slight_smile:)