# @bgd-labs/aave-v3-governance-cache

> ## About

Latest version **1.0.11** (published 2025-05-23) · 0 weekly downloads

## Install

```sh
npm install @bgd-labs/aave-v3-governance-cache
pnpm add @bgd-labs/aave-v3-governance-cache
yarn add @bgd-labs/aave-v3-governance-cache
bun add @bgd-labs/aave-v3-governance-cache
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; large bundle.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2025-05-23 |
| First published | 2024-04-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 27.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | andykoz, sakulstra, smbdy |

## Links

- npm: https://www.npmjs.com/package/@bgd-labs/aave-v3-governance-cache
- npm.io page: https://npm.io/package/@bgd-labs/aave-v3-governance-cache

## Recent versions

- 1.0.11 (latest) — 2025-05-23
- 1.0.10 — 2025-01-28
- 1.0.9 — 2025-01-28
- 1.0.8 — 2024-10-17
- 1.0.7 — 2024-08-16
- 1.0.6 — 2024-06-26
- 1.0.5 — 2024-06-05
- 1.0.4 — 2024-06-05
- 1.0.3 — 2024-06-02
- 1.0.2 — 2024-06-02
- 1.0.1 — 2024-05-29
- 1.0.0 — 2024-05-29
- 0.0.14 — 2024-04-22
- 0.0.13 — 2024-04-22
- 0.0.12 — 2024-04-20
- … 11 more at https://npm.io/package/@bgd-labs/aave-v3-governance-cache/versions

## README

# Experimental: v3-governance-cache :ghost:

## About

Handling cache in decentralized applications is usually quite painful as the options of dynamic data storage in the space is limited.
Therefore applications usually go either:

- "fully decentralized", which usually results in repetitive work on the client side or
- "fully centralized"

Applications around aave governance exist on both sides of the spectrum, but there's currently no agnostic solution that fits both needs.
To close this gap `@bgd-labs/aave-v3-governance-cache`(temporary name) offers a common interface and a variety of provider for interfaces to go their own way.

## Providers

### Local Cache

The `customStorageProvider` is a simple file based cache that fetches "new" data based on the last seen block and stores them in json files per proposal.
If no cache is found the cache will try to refresh automatically.

```
import {customStorageProvider} from '@bgd-labs/aave-v3-governance-cache/localCache';
import {customStorageProvider} from '@bgd-labs/aave-v3-governance-cache/fileSystem';


const cachingLayer = customStorageProvider();

const payload = cachingLayer.getPayload({chainId, payloadsController, payloadId});
const proposal = cachingLayer.getProposal({chainId, governance, proposalId});
```

### Github hybrid Cache

The `githubHybridCache` is a a hybrid cache that tries to fetch the cache from github pages (which act as a simple json api).
If no results are found, the caching layer will fallback to the specified fallback.

```
import {githubHybridCacheAdapter} from '@bgd-labs/aave-v3-governance-cache/githubHybrid';
import {localCacheAdapter} from '@bgd-labs/aave-v3-governance-cache/localCache';

const cachingLayer = githubHybridCacheAdapter(localCacheAdapter);
```

## Install

To install:

```bash
bun install @bgd-labs/aave-v3-governance-cache
```

## Follow up work

- [ ] generate a sitemap with all the data directly reachable from this page
- [ ] create postgres adapter for systems that can rely on a centralized db somewhere

---
_Source: https://npm.io/package/@bgd-labs/aave-v3-governance-cache · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
