diff options
author | Oz Linden <oz@lindenlab.com> | 2011-01-18 07:37:56 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-01-18 07:37:56 -0500 |
commit | 8c2f2eb1f3365b661e4cc9d41ed4168bc9306314 (patch) | |
tree | 45d864ad23910be94cb756cee7640c2d5557163f /indra/llmessage | |
parent | e1066784220adb9a2e731001e72c444582fc997f (diff) |
make storing the cache obey the same unrefreshed time as other usage
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index ab4785569d..579dd2782c 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -462,24 +462,24 @@ void LLAvatarNameCache::importFile(std::istream& istr) av_name.fromLLSD( it->second ); sCache[agent_id] = av_name; } + LL_INFOS("AvNameCache") << "loaded " << sCache.size() << LL_ENDL; + // Some entries may have expired since the cache was stored, - // but next time they are read that will be checked. - // Expired entries are filtered out when the cache is stored, - // or in eraseUnrefreshed - LL_INFOS("AvNameCache") << "loaded " << sCache.size() << LL_ENDL; + // but they will be flushed in the first call to eraseUnrefreshed + // from LLAvatarNameResponder::idle } void LLAvatarNameCache::exportFile(std::ostream& ostr) { LLSD agents; - F64 now = LLFrameTimer::getTotalSeconds(); + F64 max_unrefreshed = LLFrameTimer::getTotalSeconds() - MAX_UNREFRESHED_TIME; cache_t::const_iterator it = sCache.begin(); for ( ; it != sCache.end(); ++it) { const LLUUID& agent_id = it->first; const LLAvatarName& av_name = it->second; // Do not write temporary or expired entries to the stored cache - if (!av_name.mIsTemporaryName && av_name.mExpires >= now) + if (!av_name.mIsTemporaryName && av_name.mExpires >= max_unrefreshed) { // key must be a string agents[agent_id.asString()] = av_name.asLLSD(); |