<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def refresh(self, document):
 		""" Load a new copy of a document from the database. does not 			replace the old one """

		try:
			old_cache_size = self.cache_size
			self.cache_size = 0
			obj = self.query(type(document)).filter_by(mongo_id=document.mongo_id).one()
		finally:
			self.cache_size = old_cache_size
		self.cache_write(obj)
		return obj