Disable Caching per Session

To reduce the overhead of sending the documents over the network, client library is caching the HTTP responses and sends only ETags to Server.

If the request was previously cached giving the Server an opportunity to send back 304 Not Modified without any content data or sending the up-to-date results, this will update the cache.

This behavior can be changed globally by disabling the HTTP Cache size (more here), but can also be changed per session using the SessionOptions.noCaching property.

Example

// Define the session's options object
const sessionOptions: SessionOptions = {
    noCaching: true // Disable caching
};

// Open the session, pass the options object 
const session = store.openSession(sessionOptions);

// The session will not cache any HTTP response data from the server