summaryrefslogtreecommitdiff
path: root/indra/llfilesystem/llfilesystem.h
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-08-13 18:35:46 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-08-14 00:31:37 -0400
commit0ee528c5fdfa8d49ebd43774853880f1b2e352d8 (patch)
tree22e1bdb72bd9c3a01a736415b7f162029be8f44f /indra/llfilesystem/llfilesystem.h
parent6dbf1cafb20557722f30618e744e5ab61e9365fa (diff)
Mitigate asset fetch thread stalls from LLDiskCache mutex contention and trivial cleanup
Move LLDiskCache::updateFileAccessTime to LLFilesystem as it's the only user of that function. Change mCacheDir and LLDiskCache::metaDataToFilepath to statics.
Diffstat (limited to 'indra/llfilesystem/llfilesystem.h')
-rw-r--r--indra/llfilesystem/llfilesystem.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llfilesystem/llfilesystem.h b/indra/llfilesystem/llfilesystem.h
index ea1b9cf3a1..983e452981 100644
--- a/indra/llfilesystem/llfilesystem.h
+++ b/indra/llfilesystem/llfilesystem.h
@@ -53,6 +53,13 @@ class LLFileSystem
bool rename(const LLUUID& new_id, const LLAssetType::EType new_type);
bool remove();
+ /**
+ * Update the "last write time" of a file to "now". This must be called whenever a
+ * file in the cache is read (not written) so that the last time the file was
+ * accessed is up to date (This is used in the mechanism for purging the cache)
+ */
+ void updateFileAccessTime(const std::string& file_path);
+
static bool getExists(const LLUUID& file_id, const LLAssetType::EType file_type);
static bool removeFile(const LLUUID& file_id, const LLAssetType::EType file_type, int suppress_error = 0);
static bool renameFile(const LLUUID& old_file_id, const LLAssetType::EType old_file_type,