# File lib/cgikit/template_store.rb, line 68
  def checkout( component )
    debug(component.class, true)
    template = restore(component)
    if template.nil? or (cache? and terminate?(template, component)) then
      template = create_template(component)
      isnew = true
      checkin(template) if cache?
      debug("create template #{component.class}")
    end
    template.component = component
    template.template_store = self
    template.template_node.component = component
    template
  end