Skip to content

Callback invocation on bucket reset #140

@jfayad

Description

@jfayad

I'm looking to see if there is any interest in having the ability to configure a callback that would be invoked whenever a bucket is being reset/cleaned ?

I have a use case where I need to collect the counter's value before it gets reset by the expiry time. In my use case, I want to check if this value should trigger a bill based on resource usage but I can think of other user case where people might want to push these values into telemetry for usage statistics.

Implementing such a callback should have no impact on hit/inc usage as it would happen when processing the cleaning message (on ETS backend).

Before I go ahead an open a PR I would like to know:

  • Is this something that has been considered before ? If yes, why hasn't it been implemented ?
  • Are you foreseeing any reason why it wouldn't be a good idea to go ahead with this feature ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions