# @expo/entity-secondary-cache-local-memory

> Local memory secondary cache for @expo/entity

Latest version **0.67.0** (published 2026-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @expo/entity-secondary-cache-local-memory
pnpm add @expo/entity-secondary-cache-local-memory
yarn add @expo/entity-secondary-cache-local-memory
bun add @expo/entity-secondary-cache-local-memory
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.67.0 |
| Published | 2026-09-18 |
| First published | 2022-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 13.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Expo |
| Maintainers | ide, brentvatne, expoadmin, exponent, bycedric, kudochien, alanhughes, tsapeta, expo-bot, philpl, ccheever, wschurman |
| Keywords | entity |

## Links

- npm: https://www.npmjs.com/package/@expo/entity-secondary-cache-local-memory
- npm.io page: https://npm.io/package/@expo/entity-secondary-cache-local-memory

## Dependencies (2)

- [@expo/entity](https://npm.io/package/@expo/entity.md) ^0.67.0
- [@expo/entity-cache-adapter-local-memory](https://npm.io/package/@expo/entity-cache-adapter-local-memory.md) ^0.67.0

## Recent versions

- 0.67.0 (latest) — 2026-09-18
- 0.66.0 — 2026-08-03
- 0.65.0 — 2026-07-10
- 0.64.0 — 2026-05-22
- 0.63.0 — 2026-04-03
- 0.62.0 — 2026-03-16
- 0.61.0 — 2026-03-12
- 0.60.0 — 2026-03-06
- 0.59.0 — 2026-03-03
- 0.58.0 — 2026-03-02
- 0.57.0 — 2026-02-28
- 0.55.0 — 2026-01-27
- 0.54.0 — 2026-01-21
- 0.53.0 — 2025-12-19
- 0.51.0 — 2025-11-21
- … 31 more at https://npm.io/package/@expo/entity-secondary-cache-local-memory/versions

## README

# `@expo/entity-secondary-cache-local-memory`

Cross-request [LRU](https://github.com/isaacs/node-lru-cache) secondary cache for `@expo/entity`. Use
this cache with caution - it is nonstandard. The cache is shared between requests in the node process.

[Documentation](https://expo.github.io/entity/modules/_expo_secondary_cache_local_memory.html)

## Usage

1. Create a concrete implementation of abstract class `EntitySecondaryCacheLoader`, in this example `TestEntitySecondaryCacheLoader`. The underlying data can come from anywhere, but an entity is constructed from the data and then authorized for the viewer.
2. Create an instance of your `EntitySecondaryCacheLoader`, passing in a `LocalMemorySecondaryEntityCache`.
   ```typescript
   const secondaryCacheLoader = new TestSecondaryLocalMemoryCacheLoader(
     new LocalMemorySecondaryEntityCache(
       GenericLocalMemoryCacher.createLRUCache<LocalMemoryTestEntityFields>({}),
     ),
     LocalMemoryTestEntity.loader(viewerContext),
   );
   ```
3. Load entities through it:
   ```typescript
   const loadParams = { id: createdEntity.getID() };
   const results = await secondaryCacheLoader.loadManyAsync([loadParams]);
   ```

---
_Source: https://npm.io/package/@expo/entity-secondary-cache-local-memory · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
