wilsonlewis6mo ago

KV watch initial value

Does KV watch always trigger an initial read of the current value? Is there a way to only watch for changes without the initial read?
1 Reply
Deno AI Helper
Deno AI Helper6mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the context of your question, it seems you are referring to a key-value store watch functionality, which typically involves monitoring changes to a key's value. In many systems, a watch function on a key-value store does trigger an initial read to provide the current value before watching for subsequent changes. This is often done to ensure that the client has the latest value before starting to listen for updates. If you're looking to watch for changes without the initial read, this behavior would be specific to the implementation of the key-value store you are using. Since I don't have access to the specifics of the implementation you're referring to, I can't provide a definitive answer. Please note that this advice is not based on the Deno documentation, and I would recommend double-checking the accuracy of this advice and consulting the documentation or source code of the specific key-value store you are using to see if it supports watching for changes without an initial read. If it's a feature of a third-party module or service, you might also consider reaching out to the maintainers or community around that project for more detailed assistance.