Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to included .lava files aren't picked up without a global cache clear (Fluid engine) #5249

Open
1 task done
MichaelAllen opened this issue Dec 14, 2022 · 4 comments
Labels
Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Status: In Dev Queue This issue is being worked on, and has someone assigned. Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@MichaelAllen
Copy link
Contributor

MichaelAllen commented Dec 14, 2022

Prerequisites

Description

When referencing a lava file using an {% include %} tag, changes to the file are not reflected on the page unless I clear the global cache. Changing the block/page cache settings doesn't change the outcome, and the "red running man" icon that bypasses most other caching also doesn't seem to have an effect on this.

Steps to Reproduce

  1. [Set Lava engine to "Fluid"]
  2. Create a file ~~/Assets/Lava/test.lava with the contents "Hello"
  3. Add an HTML block to a page with these contents: {% include '~~/Assets/Lava/test.lava' %}
  4. Notice that the page shows "Hello"
  5. Edit the file and change the contents to "Goodbye"
  6. Notice that the page still shows "Hello"
  7. Clear the global cache
  8. Notice that the page now (correctly) shows "Goodbye"

Expected behavior:

If the cache is bypassed (red running man icon), the page should immediately reflect any changes made to an included lava file.

If the cache is enabled (green running man icon), I'm not sure if I should expect external changes to be automatically picked up immediately, or if it would be equivalent to making a change with SQL where Rock doesn't know that it happened without a manual cache clear.

Actual behavior:

The lava template cache prevents the changes from being picked up without a global cache clear regardless of the cache settings.

Note: This template cache is also not clearable from the cache manager. (See #5250)

Versions

  • Rock Version: 1.13.7 and 1.15.0.8 (pre-alpha)
  • Client Culture Setting: en-US
@sparkdevnetwork-service sparkdevnetwork-service added Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs. labels Dec 14, 2022
@sparkdevnetwork-service sparkdevnetwork-service changed the title Changes to included .lava files aren't picked up without a global cache clear Changes to included .lava files aren't picked up without a global cache clear (Fluid engine) Jan 20, 2023
MichaelAllen added a commit to ValorousChurch/Rock that referenced this issue Jul 4, 2023
@sparkdevnetwork-service sparkdevnetwork-service added the Status: In Dev Queue This issue is being worked on, and has someone assigned. label Oct 17, 2023
@sparkdevnetwork-service sparkdevnetwork-service added the Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. label Nov 30, 2023
@frogydiak
Copy link

Hello! Any update on this issue? We're on v15.3 and clearing the Global Cache every time I made a change in a lava file is making development slower.

Dev team, please please include a fix on this if possible with v15.4 or 16.2. Pretty please!

@jonedmiston
Copy link
Member

@frogydiak This issue is in the underlying library we use. We have an issue opened with them. We will ping them again.
sebastienros/fluid#602

Rock is all about community. A key part of strengthening this bond is knowing who we're engaging with. Could I ask you to include your name, organization, and a photo on your GitHub profile? It's a simple way to put faces to names, fostering a more connected and personal community atmosphere.

@frogydiak
Copy link

@jonedmiston Thank you for the info.

@MichaelAllen
Copy link
Contributor Author

@frogydiak there is a workaround for this issue that was added in 16.1 (911fad7) where you can disable template caching with the "running man" icon on the admin toolbar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Status: In Dev Queue This issue is being worked on, and has someone assigned. Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

4 participants