Skip to content

Conversation

@saintentropy
Copy link
Owner

Purpose

(FILL ME IN) This section describes why this PR is here. Usually it would include a reference to the tracking task that it is part or all of the solution for.

Declarations

Check these if you believe they are true

  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB
  • This PR introduces new feature code involve network connecting and is tested with no-network mode.

Release Notes

(FILL ME IN) Brief description of the fix / enhancement. Use N/A to indicate that the changes in this pull request do not apply to Release Notes. Mandatory section

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

Exception ex;
try
{
var fileinfo = new FileInfo(path);

This comment was marked as resolved.

Flush();
}

public void Flush()
Copy link

@aparajit-pratap aparajit-pratap Jun 5, 2025

Choose a reason for hiding this comment

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

nitpick, but perhaps this will be clearer if you just call this method Serialize?

cacheFilePath = filePath;
Load();
// Not sure if this covers all cases. Can also add flush to Dispose
AppDomain.CurrentDomain.ProcessExit += (s, e) => FlushIfDirty();

Choose a reason for hiding this comment

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

Do we need to unsubscribe this?


public bool TryGet(string key, out T value) => cache.TryGetValue(key, out value);

public void Remove(string key)

Choose a reason for hiding this comment

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

I'm curious if the Remove function needs to be called at any time to clean up the cache dictionary. I think it may be needed when updating a custom node definition, i.e., a custom node with the same name as one that's already in the dictionary, but with a new time stamp that indicates that it has been edited.

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.

3 participants