Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dexter-ifti/my-cache

Repository files navigation

Task

Customizable Caching API Task: Create an API layer with the following endpoints:

- POST /cache → Stores a key-value pair.

- GET /cache/{key} → Retrieves a value (if exists).

- DELETE /cache/{key} → Remove from cache.

Requirements:

It should have a predefined max size. e.g. If max size is set to 10, no more items should be stored further and future POST requests should return an error. 

Deployed API Link

API Link for API documentation please visit API Documentation

Setup locally

  1. Clone the repository
git clone [email protected]:dexter-ifti/my-cache.git
configure `.env` file like `.env.example`

if you want to use redis locally then in cache.js simply create a new instance of redis client like this

const redisClient = redis.createClient();
  1. Run npm install
  2. Run npm run dev

GitAds Sponsored

Sponsored by GitAds

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published