It would be nice to support async context in view manager.
My use case is to query cached data from catbox client and pass it to frontend to generate menus and lists, etc.
EG:
server.views({
engines: {
html: Handlebars
},
...
context: async () => {
return {
posts: await server.methods.getCachedPosts()
}
}
});
Currently, I have to hoist the response into an object store and wait for it to populate before it reflects in my frontend, which means I need to refresh that object store whenever cache expires.
It would be nice to support async context in view manager.
My use case is to query cached data from catbox client and pass it to frontend to generate menus and lists, etc.
EG:
Currently, I have to hoist the response into an object store and wait for it to populate before it reflects in my frontend, which means I need to refresh that object store whenever cache expires.