whole_func_string: function cachedOrNewService(service, locales, options, defaults) {
    var useOptions = (IS_UNDEFINED(defaults)) ? options : defaults;
    if (IS_UNDEFINED(locales) && IS_UNDEFINED(options)) {
      checkDateCacheCurrent();
      if (IS_UNDEFINED(defaultObjects[service])) {
        defaultObjects[service] = new savedObjects[service](locales, useOptions);
      }
      return defaultObjects[service];
    }
    return new savedObjects[service](locales, useOptions);
  }
func_code_string: function cachedOrNewService(service, locales, options, defaults) {
    var useOptions = (IS_UNDEFINED(defaults)) ? options : defaults;
    if (IS_UNDEFINED(locales) && IS_UNDEFINED(options)) {
      checkDateCacheCurrent();
      if (IS_UNDEFINED(defaultObjects[service])) {
        defaultObjects[service] = new savedObjects[service](locales, useOptions);
      }
      return defaultObjects[service];
    }
    return new savedObjects[service](locales, useOptions);
  }
func_documentation_string: Returns cached or newly created instance of a given service.
  We cache only default instances (where no locales or options are provided).