
Write one cached slot to disk (crash-safe via atomic rename)
Source:R/cache.R
dot-tdr_cache_write.RdWrites object to an RDS file inside cache_dir/slot_name/
using an atomic rename pattern (write to a .rds.tmp file, then
file.rename() to the final .rds). When the filelock
package is installed, a shared file lock is held during the rename to
prevent concurrent writes from clobbering each other.