docs: def patched_get_site_by_id(self, site_id):
      """
      Monkey patched version of Django's SiteManager._get_site_by_id() function.
  
      Adds a configurable timeout to the in-memory SITE_CACHE for each cached Site.
      This allows for the use of an in-memory cache for Site models, avoiding one
      or more DB hits on every request made to the Django application, but also allows
      for changes made to models associated with the Site model and accessed via the
      Site model's relationship accessors to take effect without having to manual
      recycle all Django worker processes active in an application environment.
      """
      now = datetime.datetime.utcnow()
      site = models.SITE_CACHE.get(site_id)
      cache_timeout = SITE_CACHE_TIMEOUTS.get(site_id, now)
      if not site or cache_timeout <= now:
          site = self.get(pk=site_id)
          models.SITE_CACHE[site_id] = site
          SITE_CACHE_TIMEOUTS[site_id] = now + get_site_cache_ttl()
      return models.SITE_CACHE[site_id]