Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Respective keys are also mentioned for a read with a particular id.

API ENDPOINTKEY
/v1/user/read/:uiduserId
/v2/user/read/:uiduserId
/v1/user/getuseruserId
/v1/role/read
/v1/user/course/list/:uid userId
/v1/org/readorgId
/v1/page/read/: pageIdpageId
/v1/page/section/listpageId

/v1/page/section/read/:sectionId

sectionId

/v1/course/batch/read/:batchId

batchId

/v2/dashboard/progress/course:batchId

batchId

/v1/system/settings/get/:field


/v1/note/read/:noteId

noteId

/v1/issuer/list

                             

/v1/user/skill/read-userIduserId

How Redis will be used :

Redis is an in-memory data structure project implementing a distributed, in-memory key-value database with optional durability. It will be used to keep API response of the most frequently used and least frequently updated API.
Redis supports primary key, indexing and composite key implementation which will be very beneficial in our use case.

...

For example : Key combination for user read API . userId and singled valued hash for each group (u for User , o  for Org )

Image Added

Following will the scenario:


  1. Service will get data from Redis and returns the response to controller.
  2. Service will not get data from Redis, now Service will get data from Database , returns it and update Redis cache for the future  :  considering valid data scenario.
  3. Service will not get data from Redis, Now it will try to get it from Database . But For a invalid data it returns the error response.  No Redis cache update. : considering invalid data scenario.