Create SQLite cache for Portal responses. Use with solanaPortalSource to cache Portal API responses locally.
portalSqliteCache(config: { path: string }): PortalCache
Example:
import { portalSqliteCache } from "@subsquid/pipes/portal-cache/node";
import { solanaPortalSource } from "@subsquid/pipes/solana";
const source = solanaPortalSource({
portal: "https://portal.sqd.dev/datasets/solana-mainnet",
cache: portalSqliteCache({
path: "./portal-cache.sqlite",
}),
});
Import from @subsquid/pipes/portal-cache/node instead of @subsquid/pipes/portal-cache.
When to Use
- Development iteration
- Testing pipelines
- Repeated processing of same slot ranges.