Skip to content

Proposal: Implement TTL for UpdateAsync and TryUpdateAsync in INatsKVStore #1105

@edison-harada

Description

@edison-harada

Proposed change

I recently notice that only some methods in INatsKVStore implements the TTL like CreateAsync and TryCreateAsync.
But if the value is updated we can't provide any TTL, so the key will use the bucket TTL.

Could the "Nats-TTL" header also be implemented for the update methods?

Use case

In some scenarios we need to update values from KV Store, but when we update it the TTL is completely removed as the new version doesn't have it.
So we need to delete and recreate the item which can cause some issues during this process to avoid the update without TTL

Contribution

Yes, it should be fine :)

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