Skip to content

Adapters

t87s supports four adapters for different environments.

For local development. Single-process, no persistence.

import { MemoryAdapter } from '@t87s/core';
const t87s = new T87s({
adapter: new MemoryAdapter(),
});

For self-hosted production. Requires Redis.

import { RedisAdapter } from '@t87s/core';
import { Redis } from '@upstash/redis';
const t87s = new T87s({
adapter: new RedisAdapter({
client: new Redis({
url: process.env.UPSTASH_REDIS_REST_URL,
token: process.env.UPSTASH_REDIS_REST_TOKEN,
}),
}),
});

If you’re using Upstash, this adapter gives you a smoother DX than the Redis Adapter.

import { UpstashAdapter } from '@t87s/core';
const t87s = new T87s({
adapter: new UpstashAdapter({
url: process.env.UPSTASH_REDIS_REST_URL,
token: process.env.UPSTASH_REDIS_REST_TOKEN,
}),
});

Turnkey caching solution with a generous free tier. Fast, offers unmatched concurrency, provides real-time cache optimization via MCP.

import { CloudAdapter } from '@t87s/core';
const t87s = new T87s({
adapter: new CloudAdapter({
apiKey: process.env.T87S_API_KEY,
}),
});