vercel / micro

Asynchronous HTTP microservices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memoize json(req) call ?

quko8 opened this issue · comments

I have some (>4) functions that wraps handler. All of those functions should try to parse json body.

My current solution:
req.json = json(req)

But maybe it will be OK, to memoize json()?

Sorry for my english. I can read, but my grammar is terrible.

Yep, it is memoized.