Registry / database / turing-cache

turing-cache

JSON →
library0.50.0jsnpmunverified

Application cache support for Node.js, version 0.50.0. Provides a caching abstraction layer for turing microservices, with configurable backends. Suitable for caching patterns in distributed systems. Released under Apache-2.0 license. Part of the turing-microservice ecosystem.

npm install turing-cache
INSTALL
IMPORT
SIG · TURING-CACHE
T
turing-cache
databasejavascriptv0.50.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Cache
✓ import { Cache } from 'turing-cache'
✗ const Cache = require('turing-cache').Cache
Named export for the cache class.
createCache
✓ import { createCache } from 'turing-cache'
✗ const createCache = require('turing-cache').createCache
Factory function to create a cache instance.
MemoryBackend
✓ import { MemoryBackend } from 'turing-cache'
✗ const MemoryBackend = require('turing-cache').MemoryBackend
In-memory cache backend.

Initializes a cache with in-memory backend, sets and retrieves a value, then deletes it.

import { createCache, MemoryBackend } from 'turing-cache'; const cache = createCache({ backend: new MemoryBackend(), ttl: 60000 // 1 minute }); await cache.set('key', { data: 'value' }); const value = await cache.get('key'); console.log(value); // { data: 'value' } await cache.delete('key'); const missing = await cache.get('key'); console.log(missing); // null
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.50.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
OpenAI (training)
1
Resources
turing-cache — npm install turing-cache · libregistry