HTTP handler for integrating custom cache solutions in Nx workspaces.
npm install @robby-rabbitman/nx-plus-nx-http-cache


A http handler that implements the Nx Remote Caching OpenAPI for integrating a custom cache solution.
Checkout the azurite blob storage example.
``ts
import { createServer } from 'http';
import {
nxHttpCacheHandler,
NxCache,
} from '@robby-rabbitman/nx-plus-nx-http-cache';
// TODO: make sure to implement your caching solution
class MyCache
implements
NxCache
{
get: (
hash: string,
) => Promise
has: (
hash: string,
) => Promise
set: (
hash: string,
data: Buffer,
) => Promise
}
const server =
createServer(
nxHttpCacheHandler(
new MyCache(),
{
readAccessToken:
'my-read-access-token',
writeAccessToken:
'my-write-access-token',
},
),
);
server.listen(
3000,
);
``