Assets S3 Cache Duration and CP Thumbnails What does everyone consider a sensible cache duration to use when using Assets with S3/Cloudfront? Is 3 hours sensible or should it be longer?
Secondly, does this have any impact on the assets being displayed within Craft? Listing Asset directories takes a while due to my connection speed I'm sure but aren't these assets cached locally?
With the correct cache busting, files can remained cached for as long as possible. Craft handles a lot of this for you.
I typically cache items for a year but do take caution to ensure every reference to assets within the site has a cache busting string on it. It's important to note that Cloudfront needs to be setup to use these query strings.
On the frontend, Craft appends an mtime attribute to the query string. If you ever replace an asset, the mtime is updated and subsequently a new cache is created.
Within the Craft CP, thumbnails of your remote images are generated rather than serving them from a CloudFront URL, generally there are no worries with caching here as Craft handles that.
Volumes with an expiry set will automatically load the mtime parameter when fetching the URL from Craft. Alternatively, you can implement your own cache busting with the url() function shown here.