---
title: TemporaryStorage
description: Configure TemporaryStorage in PingGateway to allocate memory and file-backed buffers for caching streamed request content
component: pinggateway
version: 2024.11
page_id: pinggateway:reference:TemporaryStorage
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/TemporaryStorage.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-06-02T09:47:34Z
superseded_by: https://docs.pingidentity.com/pinggateway/2026/reference/TemporaryStorage.html
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)
