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

Clear definitions cache after file change #2824

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Apr 7, 2024

What is this pull request for?

When the elements.yml or page_layouts.yml files change the memoiziation gets resetted, so that the next app reload includes the latest changes to these files.

This removes the need to restart the Rails server after one changed an element definition or page layout.

Checklist

@tvdeyen tvdeyen added this to the 7.2 milestone Apr 7, 2024
@tvdeyen tvdeyen requested a review from a team as a code owner April 7, 2024 21:06
Copy link

codecov bot commented Apr 7, 2024

Codecov Report

Attention: Patch coverage is 73.68421% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 95.86%. Comparing base (0c76560) to head (0105c6e).

Files Patch % Lines
lib/alchemy/engine.rb 54.54% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2824      +/-   ##
==========================================
- Coverage   95.92%   95.86%   -0.06%     
==========================================
  Files         225      225              
  Lines        6128     6143      +15     
==========================================
+ Hits         5878     5889      +11     
- Misses        250      254       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

When the `elements.yml` or `page_layouts.yml` files change
the memoiziation gets resetted, so that the next app reload
includes the latest changes to these files.

This removes the need to restart the Rails server after one
changed an element definition or page layout.
@tvdeyen tvdeyen disabled auto-merge April 10, 2024 11:14
@tvdeyen tvdeyen merged commit 17908f9 into AlchemyCMS:main Apr 10, 2024
33 of 35 checks passed
@tvdeyen tvdeyen deleted the file-watcher branch April 10, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants