summaryrefslogtreecommitdiff
path: root/indra/llfilesystem/lldiskcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llfilesystem/lldiskcache.h')
-rw-r--r--indra/llfilesystem/lldiskcache.h33
1 files changed, 4 insertions, 29 deletions
diff --git a/indra/llfilesystem/lldiskcache.h b/indra/llfilesystem/lldiskcache.h
index b60e74f8c9..f07b26c2d7 100644
--- a/indra/llfilesystem/lldiskcache.h
+++ b/indra/llfilesystem/lldiskcache.h
@@ -81,7 +81,7 @@ class LLDiskCache :
* a child of the main Viewer cache directory. Defined
* by the setting at 'DiskCacheDirName'
*/
- const std::string cache_dir,
+ const std::string& cache_dir,
/**
* The maximum size of the cache in bytes - Based on the
* setting at 'CacheSize' and 'DiskCachePercentOfTotal'
@@ -104,16 +104,7 @@ class LLDiskCache :
* so many things had to be pushed back there to accomodate it, that I
* decided to move it here. Still not sure that's completely right.
*/
- const std::string metaDataToFilepath(const std::string id,
- LLAssetType::EType at,
- const std::string extra_info);
-
- /**
- * 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 const std::string metaDataToFilepath(const LLUUID& id, LLAssetType::EType at);
/**
* Purge the oldest items in the cache so that the combined size of all files
@@ -148,13 +139,7 @@ class LLDiskCache :
* directory. Primarily used here to determine the directory size
* before and after the cache purge
*/
- uintmax_t dirFileSize(const std::string dir);
-
- /**
- * Utility function to convert an LLAssetType enum into a
- * string that we use as part of the cache file filename
- */
- const std::string assetTypeToString(LLAssetType::EType at);
+ uintmax_t dirFileSize(const std::string& dir);
private:
/**
@@ -170,17 +155,7 @@ class LLDiskCache :
* setting could potentially point it at a non-cache directory (for example,
* the Windows System dir) with disastrous results.
*/
- std::string mCacheDir;
-
- /**
- * The prefix inserted at the start of a cache file filename to
- * help identify it as a cache file. It's probably not required
- * (just the presence in the cache folder is enough) but I am
- * paranoid about the cache folder being set to something bad
- * like the users' OS system dir by mistake or maliciously and
- * this will help to offset any damage if that happens.
- */
- std::string mCacheFilenamePrefix;
+ static std::string sCacheDir;
/**
* When enabled, displays additional debugging information in