Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispatch Events #33

Merged
merged 4 commits into from
Sep 28, 2023
Merged

Dispatch Events #33

merged 4 commits into from
Sep 28, 2023

Conversation

rawilk
Copy link
Owner

@rawilk rawilk commented Sep 28, 2023

This PR adds three events that will be dispatched:

SettingsFlushed

Event is dispatched when the flush method is called on the settings service. The event receives the following arguments:

  • $keys: The subset of keys being flushed, if any
  • $teamId: The current team id set on the settings service
  • $context: The current context object set on the settings service

SettingWasDeleted

Event is dispatched when a setting is deleted. The event receives the following arguments:

  • $key: The key of the setting being deleted
  • $storageKey: The generated key used by the storage mechanism on the driver
  • $cacheKey: The generated cache key of the setting
  • $teamId: The current team id set on the settings service
  • $context: The current context object set on the settings service

SettingWasStored

Event is dispatched when a setting is deleted. The event receives the following arguments:

  • $key: The key of the setting being stored
  • $storageKey: The generated key used by the storage mechanism on the driver
  • $cacheKey: The generated cache key of the setting
  • $value: The value being set for the setting
  • $teamId: The current team id set on the settings service
  • $context: The current context object set on the settings service

Note: When caching is enabled, the event will only fire if the value has changed for an already persisted setting.

@rawilk rawilk added the enhancement New feature or request label Sep 28, 2023
@rawilk rawilk merged commit b325786 into v3.x Sep 28, 2023
@rawilk rawilk deleted the feature/events branch September 28, 2023 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant