What will happen if cache and KVM have the same key name is used to store a valve at the same time ?

 
Solved Solved
0 3 785
1 ACCEPTED SOLUTION

so, you have a key 'k1' - used by both cache and kvm.

Let's say there are two values:

1) 'v1' needs to be cached and

2)'v2' needs to be put in kvm

[v1 may be equal to v2 or not]

you attempt to do both these operations at time 't1' - then the expectation is at a time, that occurs after 't1', that is t > 't1', you would notice

cache will have k1=v1

kvm will have k1=v2

Hope this helps!

View solution in original post

3 REPLIES 3

I dunno - have you tried? Is there a problem?

I guess it *should* work , but if it doesn't, then there's a pretty simple workaround, right?

so..... what are you really trying to do here?

so, you have a key 'k1' - used by both cache and kvm.

Let's say there are two values:

1) 'v1' needs to be cached and

2)'v2' needs to be put in kvm

[v1 may be equal to v2 or not]

you attempt to do both these operations at time 't1' - then the expectation is at a time, that occurs after 't1', that is t > 't1', you would notice

cache will have k1=v1

kvm will have k1=v2

Hope this helps!

Not applicable

@archanaI don't believe there would be a conflict , though the entry in the cache gets pushed to Cassandra (in the worst case) this should not conflict with KVM as these are stored separately and we have to use seperate policies to gain access to each piece of info ex:

cache content : LookupCachePolicy

KVM: KeyValueMap policy with a get

Hope this helps