Skip to content

Only fire events if persistance store is modified #123

Open

Description

@JeremyCaney

Currently, Load() only fires the TopicLoaded event via OnTopicLoaded() if a topic is actually loaded from the underlying persistence layer, as e.g., cache hits are noise that aren't likely relevant to callers. The same principle applies even more so to the other actions, and should be adopted accordingly.

Tasks

  • Only fire TopicSaved if Save() actually saved any topics (including descendants)
  • Only fire TopicDeleted if Delete() actually deleted any topics (case being !isRecursive with Children)
  • Only fire TopicMoved if Move() actually changed the parent or position of the topic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: RepositoriesRelates to the `ITopicRepository` interface or one of its implementations.Priority: 2Severity 1: MinorStatus 2: ScheduledPlanned for an upcoming release.Type: ImprovementImproves the functionality or interface of an existing feature.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions