src/vs/workbench/browser/labels.ts/ResourceLabelWidget/clearIconCache
class ResourceLabelWidget:	private clearIconCache(newLabel: IResourceLabelProps, newOptions?: IResourceLabelOptions): boolean {
		const newResource = toResource(newLabel);
		const oldResource = toResource(this.label);

		const newFileKind = newOptions ? newOptions.fileKind : undefined;
		const oldFileKind = this.options ? this.options.fileKind : undefined;

		if (newFileKind !== oldFileKind) {
			return true; // same resource but different kind (file, folder)
		}

		if (newResource && oldResource) {
			return newResource.toString() !== oldResource.toString();
		}

		if (!newResource && !oldResource) {
			return false;
		}

		return true;
	}