def ExistsInCache(cacheLocation, url): hash = md5.new(url).hexdigest() return (os.path.exists(cacheLocation + "/" + hash + ".headers") and os.path.exists(cacheLocation + "/" + hash + ".body"))