|
| ClearSkyEphemeris (const std::string &rootUri, const path &xdgDir, const std::string &storeRoot, std::chrono::system_clock::duration duration) |
| Constructor. More...
|
|
template<typename It > |
| ClearSkyEphemeris (const std::string &rootUri, const path &xdgDir, const std::string &storeRoot, std::chrono::system_clock::duration duration, It first, It last) |
|
std::string | constructUrl (const local_id_t &localId) override |
| Construct the appropriate URL for the item. More...
|
|
| WebCache (const std::string &rootUri, const path &xdgDir, const std::string &storeRoot, std::chrono::system_clock::duration duration) |
| Constructor. More...
|
|
template<typename It > |
| WebCache (const std::string &rootUri, const path &xdgDir, const std::string &storeRoot, std::chrono::system_clock::duration duration, It first, It last) |
|
void | setCacheItem (key_t key, local_id_t localId) |
| Add or change a cache item. More...
|
|
template<typename It > |
void | setCacheItem (It first, It last) |
| Add or change cache items from a container. More...
|
|
bool | storeExists () const |
| Test to see if the store exists. More...
|
|
virtual std::string | translateItemLocalId (local_id_t localId) |
| Translate a local id. More...
|
|
path | itemLocalPath (key_t key) |
| Get the filesystem path of a local item by key. More...
|
|
std::optional< path > | localItemExists (key_t key) |
| Get the local path to an item if it is known and exists in the local store. More...
|
|
std::optional< time_t > | cacheTime (const path &itemPath) |
| Get the time the item was cached if the cache time has expired. More...
|
|
bool | itemKnown (key_t key) |
|
bool | fetchAll () |
| Fetch all cache items which have not been previously cached or have expired cache times.
|
|
bool | fetchItem (key_t key) |
|
bool | pendingFutures () const |
|
bool | processFutures () |
|
|
using | key_t = uint32_t |
|
using | local_id_t = std::string |
|
using | result_t = std::tuple< long, key_t > |
|
using | item_map_t = std::map< key_t, local_id_t > |
|
using | AsyncList = std::vector< std::future< result_t > > |
|
template<typename T > |
static std::chrono::system_clock::time_point | fileClockToSystemClock (T fileTimePoint) |
| Convert a filesystem time to a system clock time point. More...
|
|
static std::chrono::system_clock::time_point | fileClockToSystemClock (const path &filePath) |
| Convert a filesystem time to a system clock time point. More...
|
|
static WebCache::result_t | fetch (WebCache::key_t key, const std::string &itemUrl, const path &itemPath, const path &tempPath, std::optional< time_t > cacheFileTime) |
| Fetch a cache item. More...
|
|
WebCacheProtocol::signal_type | cacheLoaded {} |
|
void | asyncFetchItem (item_map_t::value_type &item) |
|
std::error_code | mEc {} |
| The last error code returned from a std::filesystem operation.
|
|
std::string | mRootURI {} |
| The root URI for items in the cache.
|
|
path | mStoreRoot {} |
| The root of the filesystem backing store.
|
|
file_status | mStoreStatus {} |
| File status of the filesystem backing store root.
|
|
std::mutex | mMutex |
| Mutex for locking the WebFileCache.
|
|
item_map_t | mItemMap {} |
| The map of keys to local cache items.
|
|
AsyncList | mAsyncList {} |
| The list of asynchronous fetches active.
|
|
std::chrono::system_clock::duration | mCacheValidDuration {} |
| The duration local files are considered valid. The interval between cache refresh checks.
|
|