class SimpleForm::FormBuilder

def discovery_cache

between requests, otherwise use the instance one.
If cache_discovery is enabled, use the class level cache that persists
def discovery_cache
  if SimpleForm.cache_discovery
    self.class.discovery_cache
  else
    @discovery_cache ||= {}
  end
end