You can also just listen for TreeCache events and wait for your change to
come through.

On Thu, Nov 17, 2016 at 3:18 PM, Hendrik Haddorp <[email protected]>
wrote:

> Thanks, that was a pretty fast answer! Not quite what I had hoped for but
> at least now I know that I was right that I have to handle this myself :-)
>
>
> On 17.11.2016 21:13, Cameron McKenzie wrote:
>
> Hey Hendrick,
> The recipes don't treat local updates any differently to remote updates.
> The cache will get updated when the cursor client receives a watch event
> from Zookeeper.
>
> So your assertions are correct. The caches provide eventual consistency.
> If you need to ensure that there are no dirty reads between when you write
> locally and when you read from the cache you would need to wrap the cache
> in some manner.
>
> Cheers
>
> On 18 Nov 2016 7:06 AM, "Hendrik Haddorp" <[email protected]> wrote:
>
>> Hi,
>>
>> I'm trying to use a cache recipe, like the TreeCache. The cache itself
>> works just fine but what I don't understand is how I'm supposed to handle
>> locally triggered updates correctly. I can start the TreeCache and using
>> the events I know when it is initialized but what if I delete a child node
>> or update a node for example? If I read the data out of the cache before I
>> get the corresponding update events I get old data. As there doesn't seem
>> to be an invalidation mechanism I seem to be required to track outstanding
>> updates. Or am I missing something?
>>
>> regards,
>> Hendrik
>>
>
>

Reply via email to