getCachedCampaignContent()

in lambda/Message_Archiver/archiver/lib/pinpoint.js [64:75]


  getCachedCampaignContent(applicationId, campaignId, treatmentId) {
    const cacheKey = applicationId + ' :: ' + campaignId + ' :: ' + treatmentId;
    if (this.cacheCampaignContent[cacheKey]) {
      return this.cacheCampaignContent[cacheKey];
    }

    return this.getCampaignContent(applicationId, campaignId, treatmentId)
      .then((result) => {
        this.cacheCampaignContent[cacheKey] = result;
        return result;
      });
  }