compiler_check (CCACHE_COMPILERCHECK) By default, ccache includes the modification time (“mtime”) and size of the compiler in the hash to ensure that results retrieved from the cache are accurate. If compiler plugins are used, these plugins will also be added to the hash. This option can be used to select another strategy.
https://ccache.dev/manual/latest.html#_configuration_options
Since platforms like CI install toolchains on every run, ccache's default option for using mtime causes ccache to not utilize the cache. This PR uses a several years old environment variable to use the version output from the compiler instead.