1. Home
  2. How to use Lmod spider cache?

How to use Lmod spider cache?

The BCM Lmod package is built with spider cache functionality.  The recommended directory for storing this cache is /var/lib/lmod/mData/cacheDir, and it is recommended that the timestamp file be located at /var/lib/lmod/mData/cacheTS.txt.

The cache may be generated and updated as follows:

# /usr/share/lmod/lmod/libexec/update_lmod_system_cache_files -t /var/lib/lmod/mData/cacheTS.txt -d /var/lib/lmod/mData/cacheDir /cm/shared/modulefiles

Note how the cacheDir directory is now populated and the timestamp file has been created:

[root@sme-bcm10rocky8 ~]# ls -l /var/lib/lmod/mData/cacheDir
total 32
-rw-r–r– 1 root root 18296 Dec 12 17:58 spiderT.lua
-rw-r–r– 1 root root 11944 Dec 12 17:58 spiderT.luac_5.3

[root@sme-bcm10rocky8 ~]# ls -l /var/lib/lmod/mData/cacheTS.txt
-rw-r–r– 1 root root 0 Dec 12 17:58 /var/lib/lmod/mData/cacheTS.txt

A cron job may be used to keep the cache up-to-date as the user sees fit.

Updated on January 4, 2024