<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tofile(self, fileobj):
 		""" 		write a cache object to the fileobj as a lal cache file 		"""

		for entry in self:
			print >>fileobj, str(entry)
		fileobj.close()