Skip to content

feat: Add Hono middleware adapter #9

Closed
dyk1454683243-sudo/TriCache
#7

Description

@Kareem411

🎯 Motivation

Hono is one of the fastest and most popular web frameworks for Node.js and modern JavaScript runtimes.

Adding a lightweight tricache/hono middleware will give Hono users automatic three-tier caching, SWR, and tag invalidation.


💡 Proposed Implementation

Create a Hono middleware in src/hono/index.ts:

import { Hono } from 'hono';
import { cacheMiddleware } from 'tricache/hono';

const app = new Hono();

app.get('/api/posts', cacheMiddleware({ ttl: 300, tags: ['posts'] }), (c) => {
  return c.json({ data: '...' });
});

📂 Starting Points

  • Check src/http/index.ts for our general HTTP proxy / handler pattern.
  • Add test coverage in tests/hono.test.ts.

Feel free to claim this issue by dropping a comment below!

Activity

  1. dyk1454683243-sudo commented on Sep 19, 2026

    @dyk1454683243-sudo
    Contributor

    Taking this: first-class Node Hono middleware at tricache/hono (cacheMiddleware on CacheService — ttl/tags/SWR, ETag + If-None-Match → 304, no cache for non-2xx).

    Out of scope for this issue: the edge helper / demo in #27 (tricache/edge, honoEdgeCache), Fastify #7, and Koa #10.

  2. dyk1454683243-sudo commented on Sep 19, 2026

    @dyk1454683243-sudo
    Contributor

    PR up: #45 (tricache/hono Node cacheMiddleware on CacheService).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions