From 1d4a6d144111100d30eaefb96ed632f1d8a11dc5 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 9 Nov 2009 17:01:08 -0500 Subject: 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. --- indra/newview/llinventorymodel.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorymodel.h') 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; -- cgit v1.2.3