When a modulepath contains a cache file made for a greater version of Modules, a cache error is reported when loading modulefile
$ module -V
Modules Release 5.3.1 (2023-06-27)
$ module cachebuild
Creating /path/to/modulefiles/.modulecache
$ sed -i 's|#%Module5.3|#%Module5.4|' /path/to/modulefiles/.modulecache
$ module load bar
Cache ERROR: Cache file requires at least Modules version 5.4
In '/path/to/modulefiles/.modulecache'
Please contact <root@localhost>
Such error makes things complicated when updating Modules on a site environment where users may still be using the older version whereas cache is being built for the new one.
Note that this error is disturbing for users however it does not fail module evaluation.
Thanks to @adrien-cotte and his team for the report.