jeremydaly / jeremydaly/lambda-api

Custom cache middleware integration

Open
#135 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.5k
Forks
127
Avg merge
31m
Merged PRs (30d)
2

Description

Hi,

I'm working creating a redis cache middleware for our lambda-api layer.
I need to cache the responde after it's processed, so after the next() method.

I saw lots of people rewrites the send like below picture.
Screen Shot 2019-11-13 at 4 11 26 PM

The problem is that we have multiple return methods send, sendStatus, json, jsonp, sendFile, etc. Do I need to overwrite all them? Is that a better way to accomplish this?

I would appreciate your input. Thanks for the contribution you're doing to the community, I'm learning a lot about serverless patterns with your blog posts.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests; begin by tracing the middleware entry point around next() and the response methods send, sendStatus, json, jsonp, and sendFile. The work is not yet defined: clarify the supported caching behavior and how completion will be verified before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript, node.js, redis
Domain
api, backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.