I ran into this warning recently on PageSpeed Insights: “Serve static assets with an efficient cache policy”. The warning highlighted three assets that had no “Cache TTL” defined:

To resolve this warning, I added a Cache-Control
header with the value max-age=31536000
to the HTTP responses of my domain (31536000
is the number of seconds in a year).
I host
nelson.cloud on
Amazon CloudFront. I added this header to the CloudFront Distribution that the nelson.cloud
domain points to. This can be done by adding a “Response headers policy” in the Behavior of the Distribution. I wrote post demonstrating how to do this in detail:
How to Add a Custom Response Header to an Amazon Cloudfront Distribution.
After the header was configured, I checked PageSpeed Insights again and the warning had gone away for the assets under my domain nelson.cloud
:

(The remaining asset is not under my control so I can’t fix that one.)
Note that you may be able to use a different value smaller than 31536000
for your header. I chose a year in seconds to be on the safe side for PageSpeed Insights.