Elixir HTTP caching libraries have been updated to version 0.4.0 with support for the “stale” cache control directives. These two directives are additional directives added by RFC5861 - HTTP Cache-Control Extensions for Stale Content. They allow serving stale content in particular cases. Content is considered stale when its caching time limit has expired. For instance, using the max-age response header: cache-control: max-age=60 this page will be considered stale in 1 minute and no longer...| Tangui's blog
One year ago I released the http_cache Erlang library along with 2 Elixir libraries (plug_http_cache and tesla_http_cache) that make use of it. When I started writing these libs, I thought it would take a few weeks of work to have them completed. HTTP caching is harder than I though, and it took way longer. Why, then, bothering writing them when other HTTP caching systems already exist? In this blog post, I intend to explain my motivation and show what features they support.| Tangui's blog
In Part 1: The road to HTTP-caching Liveviews, we’ve succeeded in caching the initial rendering of Liveviews. For this we had to: disable CSRF token check, using a modified version of Phoenix disable sending the CSRF token when establishing the websocket connection configure a Plug that sets the cache-control header and eventually configure PlugHTTPCache So far we succeeded in caching Liveviews that render public content. Caching private content with plug_http_cache or a CDN makes little se...| Tangui's blog