---
title: "cache-rules list"
description: "List cache rules for a database"
canonical: "https://pgbeam.com/docs/cli/projects/cache-rules/list"
last-updated: "2026-09-14T19:37:21.000Z"
---

# cache-rules list

> List cache rules for a database

URL: https://pgbeam.com/docs/cli/projects/cache-rules/list

List all tracked query shapes and their caching status for a database. Shows the query hash, a truncated SQL pattern, query type, whether caching is enabled, call count, average latency, and PgBeam's caching recommendation. Results are paginated. Use `--page-size` and `--page-token` to navigate pages.

## Usage

## Options

Option

Description

Required

Default

`--database-id <value>`

ID of the database whose cache rules to list

Yes

-

`--page-size <value>`

Number of entries per page (1-100). Defaults to the API default.

No

-

`--page-token <value>`

Pagination token returned from a previous list call to fetch the next page

No

-

All global options (`--token`, `--profile`,
`--project`, `--org`, `--json`, `--no-color`, `--no-trunc`, `--debug`) are
also available on this command.

## Examples

## Output

Displays a table with columns: Hash, Query, Type, Cached, Calls, Avg (ms), and Recommendation. If more pages are available, prints the `--page-token` value for the next page. With `--json`, returns the full paginated response.