Create SQLite cache for Portal responses. Use with evmPortalSource to cache Portal API responses locally.
portalSqliteCache(config: { path: string }): PortalCache
Example:
import { portalSqliteCache } from "@subsquid/pipes/portal-cache/node";
import { evmPortalSource } from "@subsquid/pipes/evm";
const source = evmPortalSource({
portal: "https://portal.sqd.dev/datasets/ethereum-mainnet",
outputs: evmDecoder({ range: { from: 0 }, events: {} }),
cache: portalSqliteCache({ path: "./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 block ranges.