> ## Documentation Index
> Fetch the complete documentation index at: https://docs.standardcomputers.net/llms.txt
> Use this file to discover all available pages before exploring further.

# In-Memory Records for Fast Temporary Data in Standard

> Use in-memory records for fast temporary operations in RAM, load existing on-disk records into memory, and sync changes back to disk.

In-memory records function like on-disk records, but they exist in the temporary memory of your device (RAM). Use in-memory standards by prepending the table declaration with a `$`. This is useful for high-speed operations where you need fast reads and writes without immediately committing changes to disk.

<Note>
  In-memory records are lost when the Standard System restarts unless you sync them to disk first. Always call `sync` before shutting down if you want to preserve your changes.
</Note>

## In-Memory Tables

To initialize in-memory tables, you do not need records or an initialized table for that Standard. Given this Standard definition:

```text theme={null}
item: ITM {
    protected name string NM *
    protected price double PR *
}
```

You can create in-memory records directly:

```text theme={null}
$[item] + ("Shirt", 25.99)
$[item] + ("Pants", 25.99)
```

## Loading On-Disk Records into Memory

Replicate on-disk records into RAM with the `load` command. This will overwrite any existing in-memory records for that Standard:

```text theme={null}
load $[item]
```

## Modifying In-Memory Records

All changes are made only to data in memory and do not affect on-disk records until you explicitly sync:

```text theme={null}
#Deletes the shirt in-memory
$[item] - <name "Shirt">
```

## Syncing Changes to Disk

Once you are satisfied with your in-memory changes, sync them back to on-disk records with `sync`:

```text theme={null}
sync $[item]
```
