[MGNLCACHE-256] Allow for excluded directories in LightModuleChangesFlushPolicy Created: 20/Jul/22 Updated: 02/Feb/24 |
|
| Status: | Accepted |
| Project: | Cache Modules |
| Component/s: | cache core |
| Affects Version/s: | 5.9.4 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Richard Gange | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Release notes required: |
Yes
|
||||
| Documentation update required: |
Yes
|
||||
| Date of First Response: | |||||
| Epic Link: | Support | ||||
| Team: | |||||
| Description |
|
To reduce observation overhead it would be a nice improvement if the subdirectories within a light module could be excluded from the flush policy observation mechanism. Some light modules can have resources with with many files and deep hierarchies. Consider a node_modules directory. One option is to use the same parameter defined in the properties file: # Directories relative to magnolia.resources.dir which will be excluded from FileResourceOrigin observation. # Also see info.magnolia.resourceloader.file.FileSystemResourceOrigin#EXCLUDED_DIRECTORIES magnolia.resources.filesystem.observation.excludedDirectories=META-INF,WEB-INF,cache,docroot,logs,repositories,tmp Since the class LightModuleChangesFlushPolicy is already using the parameter FileSystemResourceOrigin.RESOURCES_DIR_PROPERTY it might make sense to do something similar as what is being done in the class FileSystemResourceOrigin#buildExclusionsFilter(). Another option might be to make the class LightModuleChangesFlushPolicy configurable so that different exclusion directories could be used. For example if a excludedDirectories property is found in config then use that otherwise fallback to FileSystemResourceOrigin.EXCLUDED_DIRECTORIES. Notes |
| Comments |
| Comment by Christopher Zimmermann [ 03/Aug/22 ] |
|
This would be a nice improvement. |
| Comment by Martijn Kooijman [ 02/Feb/24 ] |
|
Hey guys, Any updates on this one? I think it is still valid Best regards, |