Retrieve items from cache


#1

Hi,

We are using couchbase in our application.First we need to check whether results exists in cache If so we have to retrieve from cache or else we should hit the database.

So How do I check whether results exist in cache.


#2

Usually people combine “check” with “retrieve” operations. Because if it is there, you have to retrieve it anyway, otherwise you will get an error code without any payload. So just use GET operation.


#3

Dim result As Boolean = client.Store(StoreMode.[Set], “key_id”, “value to be saved”, TimeSpan.FromMinutes(5))

here it is returning false