input: Write a python function to cache the content of a URL in a local file.
  assert cache_url_content('https://www.example.com/page1') == 'cache/page1'
  assert cache_url_content('https://www.example.com/page2') == 'cache/page2'
  assert os.path.exists('cache/page1')
  assert os.path.exists('cache/page2')
output: import os
  import requests
  
  def cache_url_content(url):
      # Parse the URL to get the filename
      filename = url.split('/')[-1]
      # Define the cache directory
      cache_dir = 'cache'
      # Ensure the cache directory exists
      os.makedirs(cache_dir, exist_ok=True)
      # Define the path to the cached file
      file_path = os.path.join(cache_dir, filename)
      
      # Fetch the content from the URL
      response = requests.get(url)
      response.raise_for_status()  # Raise an error for bad status codes
  
      # Write the content to the file
      with open(file_path, 'wb') as file:
          file.write(response.content)
      
      return file_path