---
title: TemporaryStorage
description: Allocates temporary buffers for caching streamed content during request processing. Initially uses memory; when the memory limit is exceeded, switches to a temporary file.
component: pinggateway
version: 2026
page_id: pinggateway:reference:TemporaryStorage
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/TemporaryStorage.html
revdate: 2025-06-02T18:01:47Z
section_ids:
  TemporaryStorage-usage: Usage
  TemporaryStorage-properties: Properties
  TemporaryStorage-moreinfo: More information
---

# TemporaryStorage

Allocates temporary buffers for caching streamed content during request processing. Initially uses memory; when the memory limit is exceeded, switches to a temporary file.

## Usage

```json
{
  "name": string,
  "type": "TemporaryStorage",
  "config": {
    "initialLength": configuration expression<number>,
    "memoryLimit": configuration expression<number>,
    "fileLimit": configuration expression<number>,
    "directory": configuration expression<string>
  }
}
```

## Properties

* `"initialLength"`: *configuration expression<[number](preface.html#definition-number)>, optional*

  Initial size of the memory buffer.

  Default: 8 192 bytes (8 KB). Maximum: The value of `"memoryLimit"`.

* `"memoryLimit"`: *configuration expression<[number](preface.html#definition-number)>, optional*

  Maximum size of the memory buffer. When the memory buffer is full, the content is transferred to a temporary file.

  Default: 65 536 bytes (64 KB). Maximum: 2 147 483 647 bytes (2 GB).

* `"fileLimit"`: *configuration expression<[number](preface.html#definition-number)>, optional*

  Maximum size of the temporary file. If the file is bigger than this value, PingGateway responds with an OverflowException.

  Default: 1 073 741 824 bytes (1 GB). Maximum: 2 147 483 647 bytes (2 GB).

* `"directory"`: *configuration expression<[string](preface.html#definition-string)>, optional*

  The directory where temporary files are created.

  Default: `$HOME/.openig/tmp` (on Windows, `%appdata%\OpenIG\tmp`)

## More information

[org.forgerock.openig.io.TemporaryStorageHeaplet](../_attachments/apidocs/org/forgerock/openig/io/TemporaryStorageHeaplet.html)
