weird behavior with nextjs appdir experimental cache

I'm trying to use drizzle with planetscale's database-js inside of an unstable_cache (to leverage the tag caching system).
export async function getArticles() {
  return await unstable_cache(
    async () => {
      return await db.select().from(articles).limit(10);
    },
    ["articles"],
    { revalidate: 3600, tags: ["articles"] }
  )();
}

pretty simple stuff, but because database-js is based on the fetch api, it breaks when inside of the unstable_cache.
Error: cache: 'force-cache' used on fetch for https://aws.connect.psdb.cloud/psdb.v1alpha1.Database/Execute with 'export const fetchCache = 'only-no-store'

I tried changing the fetch in database-js to use undici's fetch, which fixed the problem, but that doesnt support edge runtime sadly. Anyone any ideas?
Was this page helpful?