Merged
Conversation
Collaborator
|
This is interesting... |
Collaborator
|
How does it fix the caching conflicts?!! |
Owner
Author
|
I am iterating on this PR, I got a bug report, so first trying to see if I can repro without changes but different OSes, then I will add a test, and then the fix. Using this PR as the way to run on the oses I don't have (macos). |
lahma
reviewed
Apr 25, 2025
rynowak
reviewed
Apr 25, 2025
Fluid/DefaultTemplateCache.cs
Outdated
| template = null; | ||
|
|
||
| if (_cache.TryGetValue(fileInfo.Name, out var cachedTemplate)) | ||
| if (_cache.TryGetValue(fileInfo.PhysicalPath, out var cachedTemplate)) |
There was a problem hiding this comment.
Physical path can be null for in-memory filesystems. I think this will break people unless you require this at some other level.
There was a problem hiding this comment.
Can you use the path relative to the file provider root instead?
Owner
Author
There was a problem hiding this comment.
This is problematic because IFileInfo is very limited here:
//
// Summary:
// The name of the file or directory, not including any path.
string Name { get; }
//
// Summary:
// The path to the file, including the file name. Return null if the file is not
// directly accessible.
string? PhysicalPath { get; }
rynowak
reviewed
Apr 27, 2025
| } | ||
|
|
||
| public bool TryGetTemplate(IFileInfo fileInfo, out IFluidTemplate template) | ||
| public bool TryGetTemplate(string subpath, DateTimeOffset lastModified, out IFluidTemplate template) |
This was referenced Feb 24, 2026
This was referenced Mar 2, 2026
This was referenced Mar 16, 2026
This was referenced Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.