[`LRUCache`] Storing the last access time of a cache entry in a separate file
This PR is a follow-up of https://github.com/google/jax/pull/21394. It stores the last access time of a cache entry in a separate file for LRUCache. Previously, the information was stored in the file metadata (mtime).
This PR is part of the process to add LRU cache eviction policy for the JAX persistent compilation cache. This change is necessary because we want to support GCS and potentially other cloud storage providers, where the mtime attribute may be either not available or very complicated to modify.
I am planning to get this PR merged before https://github.com/google/jax/pull/21893, because this one is more complicated and merging this PR first will make it easier to resolve merge conflicts.
Details
Previous behavior:
If cache entries: ['a', 'b']
Then cache files: ['cache_dir/a', 'cache_dir/b']
Modified behavior:
If cache entries: ['a', 'b']
Then cache files: ['cache_dir/a-cache.bin', 'cache_dir/b-cache.bin', 'cache_dir/a-atime.txt', 'cache_dir/b-atime.txt']
Blocked by the failed CompilationCacheTest above
Need https://github.com/google/jax/pull/21982 to be merged first