src/Relations/Relation.php
private function maybe_register_cache_events() {

		$key = get_class( $this );
		$key .= "-{$this->attribute}";

		if ( isset( $this->registered_cache_events[ $key ] ) ) {
			return;
		}

		$this->register_cache_events();

		$this->registered_cache_events[ $key ] = true;
	}
private function maybe_register_cache_events() {

		$key = get_class( $this );
		$key .= "-{$this->attribute}";

		if ( isset( $this->registered_cache_events[ $key ] ) ) {
			return;
		}

		$this->register_cache_events();

		$this->registered_cache_events[ $key ] = true;
	}
Maybe register cache events.

Cache events should only be registered once per relation.

@since 2.o