From 7f9f31103445de2c664e2daa2680de86030a8855 Mon Sep 17 00:00:00 2001 From: Amr Hassan Date: Wed, 25 Feb 2009 20:23:31 +0000 Subject: [PATCH] * using SHA-1 for cache keys. --- pylast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylast.py b/pylast.py index 0f7a5a9..9ca1671 100644 --- a/pylast.py +++ b/pylast.py @@ -180,7 +180,7 @@ class _Request(object): if key != "api_sig" and key != "api_key" and key != "sk": cache_key += urllib.quote_plus(key) + urllib.quote_plus(urllib.quote_plus(self.params[key])) - return cache_key + return hashlib.sha1(cache_key).hexdigest() def _is_cached(self): """Returns True if the request is available in the cache."""