orpc-dedupe-requests-plugin
Prevents duplicate requests by deduplicating similar ones to reduce server load.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Prevents duplicate requests by deduplicating similar ones to reduce server load.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Quick reference for Better Notify configuration, patterns, and common gotchas
Interactive setup wizard for adding Better Notify to a TypeScript/JavaScript project
Context and API guidance for Better Notify — end-to-end typed notification infrastructure for Node.js
Seamlessly use AI SDK inside your oRPC projects without any extra overhead.
Use oRPC inside an Astro project.
Functions to encode and decode base64url strings (URL-safe variant of base64).
| name | oRPC Dedupe Requests Plugin |
| description | Prevents duplicate requests by deduplicating similar ones to reduce server load. |
| license | MIT |
| metadata | {"author":"Ali Torki","homepage":"https://github.com/ali-master","version":"1.0.0"} |
Prevents redundant requests by deduplicating similar ones.
import { DedupeRequestsPlugin } from '@orpc/client/plugins'
const link = new RPCLink({
plugins: [
new DedupeRequestsPlugin({
filter: ({ request }) => request.method === 'GET',
groups: [
{ condition: () => true, context: {} },
],
}),
],
})
By default, only
GETrequests are deduplicated.
A request must match at least one group. Requests in the same group are deduplicated together.
Example: dedupe based on cache control:
interface ClientContext { cache?: RequestCache }
const link = new RPCLink<ClientContext>({
url: 'http://localhost:3000/rpc',
method: ({ context }) => context?.cache ? 'GET' : 'POST',
plugins: [
new DedupeRequestsPlugin({
filter: ({ request }) => request.method === 'GET',
groups: [
{
condition: ({ context }) => context?.cache === 'force-cache',
context: { cache: 'force-cache' },
},
{ condition: () => true, context: {} },
],
}),
],
fetch: (request, init, { context }) => globalThis.fetch(request, {
...init,
cache: context?.cache,
}),
})