* Updates `gcTime`, keeping the longest one seen so far. Without a value, it defaults to 5 minutes * on the client and `Infinity` on the server. * @param newGcTime - The `gcTime` from the latest options, if any.
(newGcTime: number | undefined)
| 40 | * @param newGcTime - The `gcTime` from the latest options, if any. |
| 41 | */ |
| 42 | protected updateGcTime(newGcTime: number | undefined): void { |
| 43 | // Default to 5 minutes (Infinity for server-side) if no gcTime is set |
| 44 | this.gcTime = Math.max( |
| 45 | this.gcTime || 0, |
| 46 | newGcTime ?? (isServerEnvironment() ? Infinity : 5 * 60 * 1000), |
| 47 | ) |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Cancels the scheduled removal, if there is one. |
nothing calls this directly
no outgoing calls
no test coverage detected