old_contents: from django.conf import settings
  
  from .models import SiteSetting
  
  
  def get_site_settings_and_add_to_request(request):
      settings_id = getattr(settings, 'SITE_SETTINGS_ID', None)
      try:
          site_settings = SiteSetting.objects.get(id=settings_id)
      except SiteSetting.DoesNotExist:
          site_settings = None
      request.site_settings = site_settings
      return site_settings
new_contents: from django.conf import settings
  
  from .models import SiteSetting
  
  
  def get_site_settings_and_add_to_request(request):
      settings_id = getattr(settings, 'SITE_SETTINGS_ID', None)
      try:
          site_settings = SiteSetting.objects.get(id=settings_id)
      except SiteSetting.DoesNotExist:
          site_settings = None
      request.site_settings = site_settings
      return site_settings
  
  
  def get_site_settings_uncached(site_id=None):
      return SiteSetting.objects.get(pk=site_id)
  
subject: Add get_site_settings_uncached function