# transients

> Transient JSON request caching

Latest version **0.1.1** (published 2014-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install transients
pnpm add transients
yarn add transients
bun add transients
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-03-24 |
| First published | 2014-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Taylor Young |
| Maintainers | tdy721 |
| Keywords | json, transient, transients, utility, request |

## Links

- npm: https://www.npmjs.com/package/transients
- Repository: https://github.com/digitaldesigndj/transients
- Issues: https://github.com/digitaldesigndj/transients/issues
- npm.io page: https://npm.io/package/transients

## Dependencies (1)

- [request](https://npm.io/package/request.md) ~2.34.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.1 (latest) — 2014-03-24
- 0.1.0 — 2014-03-22

## README

#JSON Transients

This plugin wraps the request module with a cache layer. Inspired by the WordPress Transients API.

### setTransient

	setTransient( name, url, cacheFor )

Returns false if the JSON request fails.

### getTransient

Creates a transient object.

	getTransient( name, callback( data ) [optional] )

Retrieves a transient object, makes a new request if the old on has expired, else returns cached Object.

Returns the transients data if no callback is provided.

Returns false if the transient was never set.

---
_Source: https://npm.io/package/transients · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
