diff options
author | Rider Linden <rider@lindenlab.com> | 2015-09-02 11:50:26 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-09-02 11:50:26 -0700 |
commit | 6c9610b4e44020bf266a5da7375fb9f2b24f4f8a (patch) | |
tree | baf73d9f0c948149dfee20d850904bed0f01f27c /indra/llmessage/llexperiencecache.h | |
parent | c5dc9b1a572f00e69b9cd3b5853f0a3d104af20f (diff) |
Move associated experience fetching into the ExperienceCache as a coro remove the responder.
Diffstat (limited to 'indra/llmessage/llexperiencecache.h')
-rw-r--r-- | indra/llmessage/llexperiencecache.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h index 937225a80a..d1222933df 100644 --- a/indra/llmessage/llexperiencecache.h +++ b/indra/llmessage/llexperiencecache.h @@ -47,22 +47,25 @@ class LLExperienceCache: public LLSingleton < LLExperienceCache > public: typedef boost::function<std::string(const std::string &)> CapabilityQuery_t; - typedef boost::function<void(const LLSD &)> Callback_t; + typedef boost::function<void(const LLSD &)> ExperienceGetFn_t; + void setCapabilityQuery(CapabilityQuery_t queryfn); void cleanup(); + //------------------------------------------- + // Cache methods void erase(const LLUUID& key); bool fetch(const LLUUID& key, bool refresh = false); void insert(const LLSD& experience_data); const LLSD& get(const LLUUID& key); - - // If name information is in cache, callback will be called immediately. - void get(const LLUUID& key, Callback_t slot); + void get(const LLUUID& key, ExperienceGetFn_t slot); // If name information is in cache, callback will be called immediately. bool isRequestPending(const LLUUID& public_key); - void setCapabilityQuery(CapabilityQuery_t queryfn); + //------------------------------------------- + void fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, ExperienceGetFn_t fn); + //------------------------------------------- static const std::string NAME; // "name" static const std::string EXPERIENCE_ID; // "public_id" static const std::string AGENT_ID; // "agent_id" @@ -120,7 +123,6 @@ private: RequestQueue_t mRequestQueue; PendingQueue_t mPendingQueue; - LLFrameTimer mRequestTimer; LLFrameTimer mEraseExpiredTimer; // Periodically clean out expired entries from the cache CapabilityQuery_t mCapability; std::string mCacheFileName; @@ -131,7 +133,7 @@ private: void requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, RequestQueue_t); void requestExperiences(); - void setMaximumLookups(int maximumLookups); + void fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID objectId, LLUUID itemId, ExperienceGetFn_t fn); void bootstrap(const LLSD& legacyKeys, int initialExpiration); void exportFile(std::ostream& ostr) const; |