Improved
- dx:
@cache
decorator andcacheFn
helper now support partial argument key functions, allowing key generators to use only a subset of parameters. This improves flexibility without losing type safety
@cache((ctx, userId) => `user:${userId}`)
async getUser(ctx: Context, userId: string, includeMeta = false) {
...
}
const fn = cacheFn((ctx, userId) => `user:${userId}`)(
async (ctx:Context, userId:string, includeMeta:boolean) => {
...
}
);
- dx:
TriFrostRedis
, the provider shim type used inside of the RedisCache now has itsset
anddel
return type set asPromise<unknown>
instead ofPromise<void>