async function getRecentUploads(){

  if(logCaching == 'true'){
    console.log('Beginning running recent uploads');

  }

  let recentUploadsAllCategories = [];

  for(const category of categories){

    if(logCaching == 'true'){
      console.log(`Getting recent uploads for category: ${category.name}`);
    }

    const searchQuery = {
      $or : [ { status: 'completed' }, { uploadUrl: { $exists: true } } ],
      visibility: 'public',
      sensitive: { $ne : true },
      uploader: { $exists: true },
      category : category.name
    };

    const selectString = 'rating title views uploader fileType thumbnailUrl ' +
      'uploadUrl uniqueTag customThumbnailUrl fileExtension thumbnails reacts uncurated category subcategory createdAt description processingCompletedAt formattedDuration';

    let recentUploads = await Upload.find(searchQuery).select(selectString).populate('uploader reacts')
      .sort({ createdAt : - 1 })
      .limit(1000)
      .lean();

    // console.log(`${recentUploads.length} uploads found for ${category.name}`);

    recentUploadsAllCategories = recentUploadsAllCategories.concat(recentUploads);
  }

  if(logCaching == 'true'){
    console.log(`Totalling an amount of ${recentUploadsAllCategories.length} for all recent uploads`);
  }

  return recentUploadsAllCategories;
}
Get all recent uploads from the database per category and concat them *