Skip to content
This repository was archived by the owner on May 2, 2022. It is now read-only.

Caching the datasource get calls for a CD set up.#184

Open
anuragc617 wants to merge 8 commits intomasterfrom
users/anchauh/cacheRequest
Open

Caching the datasource get calls for a CD set up.#184
anuragc617 wants to merge 8 commits intomasterfrom
users/anchauh/cacheRequest

Conversation

@anuragc617
Copy link
Contributor

No description provided.

const requestBody = !!dataSource.requestBody ? MustacheHelper.render(dataSource.requestBody, view) : null;
const armClient = new ArmRestClient(azureSession);
let result: any;
if (httpMethod == "GET" && Cache.getCache().getValue(armUri)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of checking at everyplace, whether the request is cached or not, Should we create a cache client which will check the URL in the map and if it is already processed then return cache result like https://www.npmjs.com/package/cacheable-request

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants