I've got an application written in Sails JS. I want to set caching for my S3 files. I'm not really sure where to start, do I need to do something with my Image GET function? Has anyone had any experience on setting caching for S3 assets?
This Is My Get Function for User Avatars: var SkipperDisk = require('skipper-s3'); var fileAdapter = SkipperDisk( { key: 'xxx', secret: 'xxx+xxx', bucket: 'xxx-xxx' }); fileAdapter.read(user.avatarFd).on('error', function(err) { // return res.serverError(err); return res.redirect('/noavatar.gif'); }).pipe(res); });