ElixirConf 2023 - Leandro Pereira - Beacon: The next generation of CMS in Phoenix LiveView

ElixirConf: ElixirConf 2023 - Leandro Pereira - Beacon: The next generation of CMS in Phoenix LiveView

Comments welcome! View the elixirconf tag for more ElixirConf talks!

6 Likes

With Beacon caching pages in memory, how does handle dynamic content? Say I’ve got a “latest posts” component on my home page that displays the 3 latest blog posts, does it:

  • clear the home page cache automatically when a new post is created
  • re-render the “latest posts” component every time the page is loaded (and keep everything else cached)
  • have an internal cache for the component that gets cleared

Or is something else happening to keep that content fresh?

the liveview is cached, not the static render

2 Likes

Thanks for the reply! I had listened to the audio only and it wasn’t as clear to me without the visuals.

Every layout, page, and component is compiled into a module that is used internally to render the final content. Those modules are recompiled whenever a change is made, but there’s no extra layer of caching because LV is so fast that we don’t need to.

I had too much to cover in just 30m so I get that some concepts may not be so clear, the good news is that I’m recording a ThinkingElixir episode that hopefully cover some of those gaps :slight_smile:

8 Likes