feat: promisify session cache methods (#17185)
This commit is contained in:
parent
652e232813
commit
fc10620082
6 changed files with 62 additions and 17 deletions
|
@ -97,12 +97,28 @@ The following methods are available on instances of `Session`:
|
|||
|
||||
* `callback` Function
|
||||
* `size` Integer - Cache size used in bytes.
|
||||
* `error` Integer - The error code corresponding to the failure.
|
||||
|
||||
Callback is invoked with the session's current cache size.
|
||||
|
||||
**[Deprecated Soon](promisification.md)**
|
||||
|
||||
#### `ses.getCacheSize()`
|
||||
|
||||
Returns `Promise<Integer>` - the session's current cache size, in bytes.
|
||||
|
||||
#### `ses.clearCache(callback)`
|
||||
|
||||
* `callback` Function - Called when operation is done.
|
||||
* `error` Integer - The error code corresponding to the failure.
|
||||
|
||||
Clears the session’s HTTP cache.
|
||||
|
||||
**[Deprecated Soon](promisification.md)**
|
||||
|
||||
#### `ses.clearCache()`
|
||||
|
||||
Returns `Promise<void>` - resolves when the cache clear operation is complete.
|
||||
|
||||
Clears the session’s HTTP cache.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue