---
title: "Disable Caching per Session"
url: "https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-disable-caching"
version: "6.2"
language: "nodejs"
---

# Disable Caching per Session

> Client language: Node.js. Also available for [C#](https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-disable-caching.md), [Java](https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-disable-caching.java.md), [PHP](https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-disable-caching.php.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

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](https://docs.ravendb.net/6.2/client-api/configuration/conventions.nodejs.md#maxhttpcachesize)),
but can also be changed per session using the `SessionOptions.noCaching` property.

## Example

```javascript
// 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
```

## See also

- [What is a session and how does it work](https://docs.ravendb.net/6.2/client-api/session/what-is-a-session-and-how-does-it-work.nodejs.md)
- [Opening a session](https://docs.ravendb.net/6.2/client-api/session/opening-a-session.nodejs.md)
- [Storing entities](https://docs.ravendb.net/6.2/client-api/session/storing-entities.nodejs.md)
- [Loading entities](https://docs.ravendb.net/6.2/client-api/session/loading-entities.nodejs.md)
- [Saving changes](https://docs.ravendb.net/6.2/client-api/session/saving-changes.nodejs.md)
