docs: def get_active_terms_ids():
          """Returns a list of the IDs of of all terms and conditions"""
  
          active_terms_ids = cache.get('tandc.active_terms_ids')
          if active_terms_ids is None:
              active_terms_dict = {}
              active_terms_ids = []
  
              active_terms_set = TermsAndConditions.objects.filter(date_active__isnull=False, date_active__lte=timezone.now()).order_by('date_active')
              for active_terms in active_terms_set:
                  active_terms_dict[active_terms.slug] = active_terms.id
  
              active_terms_dict = OrderedDict(sorted(active_terms_dict.items(), key=lambda t: t[0]))
  
              for terms in active_terms_dict:
                  active_terms_ids.append(active_terms_dict[terms])
  
              cache.set('tandc.active_terms_ids', active_terms_ids, TERMS_CACHE_SECONDS)
  
          return active_terms_ids