[Pkg-privacy-commits] [xul-ext-monkeysphere] 129/296: fix up cache object a bit

Ximin Luo infinity0 at moszumanska.debian.org
Mon Aug 24 07:39:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository xul-ext-monkeysphere.

commit e316299cf325d0ce7de85d8a7230239a9a2e3de6
Author: Jameson Rollins <jrollins at finestructure.net>
Date:   Sat Mar 6 17:03:05 2010 -0500

    fix up cache object a bit
---
 chrome/content/monkeysphere.js | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/chrome/content/monkeysphere.js b/chrome/content/monkeysphere.js
index 400dcf2..436df31 100644
--- a/chrome/content/monkeysphere.js
+++ b/chrome/content/monkeysphere.js
@@ -492,19 +492,21 @@ var monkeysphere = {
   },
 
 ////////////////////////////////////////////////////////////
-// CACHE FUNCTIONS
+// CACHE OBJECT
 ////////////////////////////////////////////////////////////
 
+  // cache object to store and retrieve data about monkeysphere status for sites
+  // uses string of apd as key, and agent response as data
   cache: (function() {
     var responses = {};
     return {
-      query: function(key) {
-        return responses[key];
+      set: function(apd, agentResponse) {
+        responses[apd.toCacheLabel()] = agentResponse;
       },
-      set: function(key, value) {
-        responses[key] = value;
+      get: function(apd) {
+        return responses[apd.toCacheLabel()];
       }
-    }
+    };
   })(),
 
 ////////////////////////////////////////////////////////////

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/xul-ext-monkeysphere.git



More information about the Pkg-privacy-commits mailing list