# Getting Started

> Install and configure @anymux/cache.

Source: https://anymux-docs.n.yatsyk.com/docs/cache/getting-started

# Getting Started

## Installation

```bash
pnpm add @anymux/cache
```

## Basic Usage

```ts
import { CachedFileSystem } from "@anymux/cache";
import { S3FileSystem } from "@anymux/s3";

const s3 = new S3FileSystem({ bucket: "my-bucket", region: "us-east-1" });
const fs = new CachedFileSystem({ fs: s3 });

// First read fetches from S3
const content = await fs.readFile("/data.json");

// Second read is served from cache
const cached = await fs.readFile("/data.json");
```
