Permalink
Browse files

drop MongoCache

  • Loading branch information...
1 parent bb5b2b6 commit 7784d4eeb1dae5bc4cd7df2fe2cf5bd9a74618ff @jamesturk committed Apr 19, 2012
Showing with 0 additions and 25 deletions.
  1. +0 −25 scrapelib.py
View
@@ -201,31 +201,6 @@ def from_httplib2_response(self, url, resp):
headers=resp)
-class MongoCache(object):
- """
- Implements the httplib2 cache protocol using MongoDB
- (especially useful with capped collection)
- """
-
- def __init__(self, collection):
- """
- :param collection: a pymongo collection obj to store the cache in
- """
- self.collection = collection
-
- def get(self, key):
- ret = self.collection.find_one({'_id': key})
- if ret:
- ret = ret['value']
- return ret
-
- def set(self, key, value):
- self.collection.save({'_id': key, 'value': value})
-
- def delete(self, key):
- self.collection.remove({'_id': key})
-
-
class Scraper(object):
"""
Scraper is the most important class provided by scrapelib (and generally

0 comments on commit 7784d4e

Please sign in to comment.