There are several ways around this. But I think the simplest would be to write the key like this: post-${id} and then there would be a middleware to fetch the cached post or the comment, this according to the controller.
Thank god π Yes, that would imply having a middleware for the posts and another one for the comments. I think it would be a quick and simple solution. π
There are several ways around this. But I think the simplest would be to write the key like this:
post-${id}
and then there would be a middleware to fetch the cached post or the comment, this according to the controller.I hope I understood your question π
Okay thanks, you did get my question right.
This actually means that there will be a different middleware to handle this, right?
Thank god π Yes, that would imply having a middleware for the posts and another one for the comments. I think it would be a quick and simple solution. π
Great! Thank Francisco, i really appreciate.
Once again, awesome pieceπ€πΌπ
Thank you very much π