![]() |
CernVM-FS
2.13.0
|
#include "cache_posix.h"
Go to the source code of this file.
Classes | |
class | anonymous_namespace{cache_posix.cc}::CallGuard |
Namespaces | |
anonymous_namespace{cache_posix.cc} | |
Macros | |
#define | __STDC_FORMAT_MACROS |
#define __STDC_FORMAT_MACROS |
This file is part of the CernVM File System.
The cache module maintains the local file cache. Files are staged into the cache by Fetch(). The cache stores files with a name according to their content hash.
The procedure is
Each running CVMFS instance has to have a separate cache directory. The local cache directory (directories 00..ff) can be accessed in parallel to a running CVMFS, i.e. files can be deleted for instance anytime. However, this will confuse the cache database managed by the lru module.
Files are created in txn directory first. At the very latest point they are renamed into their "real" content hash names atomically by rename(). This concept is taken over from GROW-FS.
Identical URLs won't be concurrently downloaded. The first thread performs the download and informs the other, waiting threads on pipes.
Definition at line 27 of file cache_posix.cc.