diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-09 17:01:08 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-09 17:01:08 -0500 |
commit | 1d4a6d144111100d30eaefb96ed632f1d8a11dc5 (patch) | |
tree | d5596dfecf54d48bb12cf6736607c3fe9b59ae36 /indra/newview/llinventorymodel.h | |
parent | c189943583f13dba0b56d58e4e4adec4f7f7f650 (diff) |
For EXT-2325: Should purge inventory cache moving from 1.23 to 2.0.
Added a version field at the beginning of inventory cache files. If version field is not found or does not match expectected value, then the cache is discarded. In 1.23, the version line triggers a warning but is otherwise ignored.
Reviewed by Seraph.
Diffstat (limited to 'indra/newview/llinventorymodel.h')
-rw-r--r-- | indra/newview/llinventorymodel.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index aba0a619db..faf026887a 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -446,7 +446,8 @@ protected: // file import/export. static bool loadFromFile(const std::string& filename, cat_array_t& categories, - item_array_t& items); + item_array_t& items, + bool& is_cache_obsolete); static bool saveToFile(const std::string& filename, const cat_array_t& categories, const item_array_t& items); @@ -518,6 +519,9 @@ protected: static F32 sMaxTimeBetweenFetches; static S16 sBulkFetchCount; + // Expected inventory cache version + const static S32 sCurrentInvCacheVersion; + // This flag is used to handle an invalid inventory state. bool mIsAgentInvUsable; |