Thursday, February 2, 2017

ASP.NET Saving CPU Cycles with Static Resource Hashes


Subscribe now for more IT-knowledge. Stay ahead of the game and get some serious skills: https://www.youtube.com/channel/UCTk2ZeMmm_v01OGqBSKTivA?sub_confirmation=1 In today's episode, Monster Dave prototypes an approach to generating static resource URLs to potentially improve the performance of an ASP.NET Core application. Borrowing ideas from a recent blog post by the Facebook engineering team. First, we create a tag helper to generate static resource URLs based on a hash of the file's contents. Next, we write some custom middleware to rewrite those new URLs to the actual file and to always return 304 not-modified for all conditional requests. The Blog Post: https://code.facebook.com/posts/557147474482256 NOTE: This video is intended to explore the concepts outlined in the blog post above and are not be suited for production use. tag:ASP.NEThttps://youtu.be/bxLpNZxVo3U