---
name: "Catmandu::Flushable"
section: "3pm"
platform: "linux"
package: "libcatmandu-perl"
version: "1.2024-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Flushable"
---

# Catmandu::Flushable(3pm)

Optional role for flushable bags

## NAME

Catmandu::Flushable - Optional role for flushable bags

## DESCRIPTION

`"flush"` makes sure that data added get persisted to disk for stores that support this operation (e.g. Elasticsearch).

This role also installs a hook that calls `"flush"` on `"commit"`.

## SYNOPSIS

```
    $store->bag->flush;
```

## METHODS

### flush

Flush the bag.
