From b588554ce1ac5fba3f5a2d90c7fa7c63e64af6f3 Mon Sep 17 00:00:00 2001 From: Luan Date: Mon, 3 Jun 2024 19:16:41 -0300 Subject: [PATCH] chore: update docs [skip ci] --- README.md | 5 +++-- src/core/Session.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aadb53d1..688fc4ca 100644 --- a/README.md +++ b/README.md @@ -102,11 +102,12 @@ const youtube = await Innertube.create(/* options */); | `visitor_data` | `string` | Setting this to a valid and persistent visitor data string will allow YouTube to give this session tailored content even when not logged in. A good way to get a valid one is by either grabbing it from a browser or calling InnerTube's `/visitor_id` endpoint. | `undefined` | | `retrieve_player` | `boolean` | Specifies whether to retrieve the JS player. Disabling this will make session creation faster. **NOTE:** Deciphering formats is not possible without the JS player. | `true` | | `enable_safety_mode` | `boolean` | Specifies whether to enable safety mode. This will prevent the session from loading any potentially unsafe content. | `false` | -| `generate_session_locally` | `boolean` | Specifies whether to generate the session data locally or retrieve it from YouTube. This can be useful if you need more performance. | `false` | +| `generate_session_locally` | `boolean` | Specifies whether to generate the session data locally or retrieve it from YouTube. This can be useful if you need more performance. **NOTE:** If you are using the cache option and a session has already been generated, this will be ignored. If you want to force a new session to be generated, you must clear the cache or disable session caching. | `false` | +| `enable_session_cache` | `boolean` | Specifies whether to cache the session data. | `true` | | `device_category` | `DeviceCategory` | Platform to use for the session. | `DESKTOP` | | `client_type` | `ClientType` | InnerTube client type. | `WEB` | | `timezone` | `string` | The time zone. | `*` | -| `cache` | `ICache` | Used to cache the deciphering functions from the JS player. | `undefined` | +| `cache` | `ICache` | Used to cache algorithms, session data, and OAuth2 tokens. | `undefined` | | `cookie` | `string` | YouTube cookies. | `undefined` | | `fetch` | `FetchFunction` | Fetch function to use. | `fetch` | diff --git a/src/core/Session.ts b/src/core/Session.ts index 8210eea5..c21456df 100644 --- a/src/core/Session.ts +++ b/src/core/Session.ts @@ -136,7 +136,7 @@ export type SessionOptions = { * This can be useful if you need more performance. * * **NOTE:** If you are using the cache option and a session has already been generated, this will be ignored. - * If you want to force a new session to be generated, you must clear the cache. + * If you want to force a new session to be generated, you must clear the cache or disable session caching. */ generate_session_locally?: boolean; /**