prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Remove the `clearcache` management command
  ### Proposed Changes
  
  Remove the `clearcache` management command (from the `core` app), and omit it from the upgrade script.
  
  ### Justification
  
  ~This command was introduced back when we were experimenting with query caching, and is no longer needed.~ I was mistaken; it was actually introduced under #9122 to provide a mechanism for clearing the cached API spec. However, this is also no longer used since we moved to `drf-spectacular` (see #9608).
  
  The Django cache is currently used only for discrete caching operations, including:
  
  * Config revision tracking
  * Recording the most recent release
  * Caching RSS feed content (the RSSFeedWidget)
  
  There has already been at least one bug related to this function (see #14182). Additionally, plugins may utilize the cache for other purposes, and we cannot make the assumption that it is safe to clear other cached data.
  
  ### Impact
  
  Any mechanisms within NetBox or a plugin which employ caching will be responsible for their own cleanup, where applicable.
  
  </issue>
  <code>
  [start of netbox/core/management/commands/clearcache.py]
  1 from django.core.cache import cache
  2 from django.core.management.base import BaseCommand
  3 
  4 from core.models import ConfigRevision
  5 
  6 
  7 class Command(BaseCommand):
  8     """Command to clear the entire cache."""
  9     help = 'Clears the cache.'
  10 
  11     def handle(self, *args, **kwargs):
  12         # Fetch the current config revision from the cache
  13         config_version = cache.get('config_version')
  14         # Clear the cache
  15         cache.clear()
  16         self.stdout.write('Cache has been cleared.', ending="\n")
  17         if config_version:
  18             # Activate the current config revision
  19             ConfigRevision.objects.get(id=config_version).activate()
  20             self.stdout.write(f'Config revision ({config_version}) has been restored.', ending="\n")
  21
  [end of netbox/core/management/commands/clearcache.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/netbox/core/management/commands/clearcache.py b/netbox/core/management/commands/clearcache.py
  deleted file mode 100644
  --- a/netbox/core/management/commands/clearcache.py
  +++ /dev/null
  @@ -1,20 +0,0 @@
  -from django.core.cache import cache
  -from django.core.management.base import BaseCommand
  -
  -from core.models import ConfigRevision
  -
  -
  -class Command(BaseCommand):
  -    """Command to clear the entire cache."""
  -    help = 'Clears the cache.'
  -
  -    def handle(self, *args, **kwargs):
  -        # Fetch the current config revision from the cache
  -        config_version = cache.get('config_version')
  -        # Clear the cache
  -        cache.clear()
  -        self.stdout.write('Cache has been cleared.', ending="\n")
  -        if config_version:
  -            # Activate the current config revision
  -            ConfigRevision.objects.get(id=config_version).activate()
  -            self.stdout.write(f'Config revision ({config_version}) has been restored.', ending="\n")
  
verification_info: {"golden_diff": "diff --git a/netbox/core/management/commands/clearcache.py b/netbox/core/management/commands/clearcache.py\ndeleted file mode 100644\n--- a/netbox/core/management/commands/clearcache.py\n+++ /dev/null\n@@ -1,20 +0,0 @@\n-from django.core.cache import cache\n-from django.core.management.base import BaseCommand\n-\n-from core.models import ConfigRevision\n-\n-\n-class Command(BaseCommand):\n-    \"\"\"Command to clear the entire cache.\"\"\"\n-    help = 'Clears the cache.'\n-\n-    def handle(self, *args, **kwargs):\n-        # Fetch the current config revision from the cache\n-        config_version = cache.get('config_version')\n-        # Clear the cache\n-        cache.clear()\n-        self.stdout.write('Cache has been cleared.', ending=\"\\n\")\n-        if config_version:\n-            # Activate the current config revision\n-            ConfigRevision.objects.get(id=config_version).activate()\n-            self.stdout.write(f'Config revision ({config_version}) has been restored.', ending=\"\\n\")\n", "issue": "Remove the `clearcache` management command\n### Proposed Changes\r\n\r\nRemove the `clearcache` management command (from the `core` app), and omit it from the upgrade script.\r\n\r\n### Justification\r\n\r\n~This command was introduced back when we were experimenting with query caching, and is no longer needed.~ I was mistaken; it was actually introduced under #9122 to provide a mechanism for clearing the cached API spec. However, this is also no longer used since we moved to `drf-spectacular` (see #9608).\r\n\r\nThe Django cache is currently used only for discrete caching operations, including:\r\n\r\n* Config revision tracking\r\n* Recording the most recent release\r\n* Caching RSS feed content (the RSSFeedWidget)\r\n\r\nThere has already been at least one bug related to this function (see #14182). Additionally, plugins may utilize the cache for other purposes, and we cannot make the assumption that it is safe to clear other cached data.\r\n\r\n### Impact\r\n\r\nAny mechanisms within NetBox or a plugin which employ caching will be responsible for their own cleanup, where applicable.\n", "before_files": [{"content": "from django.core.cache import cache\nfrom django.core.management.base import BaseCommand\n\nfrom core.models import ConfigRevision\n\n\nclass Command(BaseCommand):\n    \"\"\"Command to clear the entire cache.\"\"\"\n    help = 'Clears the cache.'\n\n    def handle(self, *args, **kwargs):\n        # Fetch the current config revision from the cache\n        config_version = cache.get('config_version')\n        # Clear the cache\n        cache.clear()\n        self.stdout.write('Cache has been cleared.', ending=\"\\n\")\n        if config_version:\n            # Activate the current config revision\n            ConfigRevision.objects.get(id=config_version).activate()\n            self.stdout.write(f'Config revision ({config_version}) has been restored.', ending=\"\\n\")\n", "path": "netbox/core/management/commands/clearcache.py"}]}