</>PackageGraphPackageGraph

ocache

npmv0.3.0TypeScript

Composable caching primitives with TTL, SWR, and HTTP response caching

Safe to adopt

Yes — ocache scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 22 days ago. 7 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • AMaintenance: grade A, Excellent.

    Last published 22 days ago. 7 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 99 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding ocache to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

99 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
No constraint declared
Module format
ESM only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the ocache README.

import { defineCachedFunction } from "ocache";

const cachedFetch = defineCachedFunction(
  async (url: string) => {
    const res = await fetch(url);
    return res.json();
  },
  {
    maxAge: 60, // Cache for 60 seconds
    name: "api-fetch",
  },
);

// First call hits the function, subsequent calls return cached result
Example truncated — see the full README.

Dependencies

Declared by ocache v0.3.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (12)

@types/node ^26.2.0@vitest/coverage-v8 ^4.1.10automd ^0.4.3changelogen ^0.6.2docs4ts ^0.0.4mitata ^1.0.34obuild ^0.4.38oxfmt ^0.63.0oxlint ^1.78.0rolldown ^1.2.4typescript ^7.0.2vitest ^4.1.10

Used by

Popular packages that depend on ocache.

Relationship graph

Dependencies (left) and dependents (right) of ocache.

h3ocache
ocache dependencies dependents

Frequently installed together

Release history

7 releases in the last two years, typically about 29 days apart.

Recent versions of ocache
VersionPublishedSizeLicense
0.3.0latest22 days ago99 KBMIT
0.2.02 months ago55 KBMIT
0.1.53 months ago35 KBMIT
0.1.45 months ago34 KBMIT
0.1.35 months ago34 KBMIT
0.1.26 months ago25 KBMIT
0.1.16 months ago23 KBMIT
0.0.04 years ago61 BMIT

Overview

ocache is an npm package that composable caching primitives with TTL, SWR, and HTTP response caching. It has 1 known dependents in the graph. The latest version is 0.3.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need composable caching primitives with TTL, SWR, and HTTP response caching and value a focused solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Frequently asked questions

Should I use ocache?

Yes — ocache scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 22 days ago. 7 releases in the last 2 years.

How do I install ocache?

Run `npm install ocache` to add ocache to your npm project.

What license is ocache released under?

ocache is distributed under the MIT license.

How popular is ocache?

npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on ocache.

Is ocache still maintained?

The most recent release of ocache (v0.3.0) was published 22 days ago.

Does ocache run install scripts?

No. ocache does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.