async function setRecentUploads(){
  let recentUploads  = await getRecentUploads();

  console.log('Calculating view amounts');
  console.log(moment(new Date).format('hh:mm:ss A'));

  // calculate view periods for each upload
  recentUploads = await Promise.all(recentUploads.map(async function(upload){

    // console.log(upload.uniqueTag);

    // console.log(`view amount ${upload.viewAmount}`);

    upload.timeAgo = timeAgoEnglish.format( new Date(upload.processingCompletedAt || upload.createdAt) );

    upload.viewsAllTime = await View.find({
      upload: upload._id
    }).countDocuments();

    return upload;

    // console.log(index + ' done')

    // calculate their views per period (last24h, lastweek)
  }));

  // build json objects representing uploads
  recentUploads = buildObjects(recentUploads);

  const redisKey = 'recentUploads';
  const response = await redisClient.setAsync(redisKey, JSON.stringify(recentUploads));

  if(logCaching == 'true'){
    console.log(`REDIS RESPONSE FOR ${redisKey}: ${response}`);
    console.log(`${redisKey} cached`);
  }

}
Get recent uploads per the function above, calculate their views per time period *