docs: def create_content(self):
          """
          Render the template, apply options on it, and save it to the cache.
          """
          self.render_node()
  
          if self.options.compress_spaces:
              self.content = self.RE_SPACELESS.sub(' ', self.content)
  
          if self.options.compress:
              to_cache = self.encode_content()
          else:
              to_cache = self.content
  
          to_cache = self.join_content_version(to_cache)
  
          try:
              self.cache_set(to_cache)
          except Exception:
              if is_template_debug_activated():
                  raise
              logger.exception('Error when saving the cached template fragment')