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

Cache Invalidation for SSH Edits #3

Closed
rosenbrockc opened this issue Jun 17, 2014 · 1 comment
Closed

Cache Invalidation for SSH Edits #3

rosenbrockc opened this issue Jun 17, 2014 · 1 comment

Comments

@rosenbrockc
Copy link
Owner

When files are edited over tramp they get cached until the file is modified. The routine that invalidates the cache only runs whenever a module is requested to be loaded either directly or as a dependency of another module. Lots of developers save their file every minute out of habit; if the file on the remote server changes often, we don't necessarily want to keep reparsing it over SSH because it takes time and could impede the responsiveness of the auto-completion suggestions.

Perhaps it is good to enable a longer cache duration for SSH edits (e.g. 10 minutes) during which time the file won't be reparsed even if there is a newer version on disk. The fortpy:reparse-buffer-file function could still force the reparse manually, but it wouldn't be automated. Since we do have real-time update of code, I don't think it would adversely affect the developer experience much.

@rosenbrockc
Copy link
Owner Author

Added a one minute delay between checks of the file modification time for both SSH and non-SSH isense. After a minute has elapsed, the file is reparsed using the regular logic that makes sure it has actually been modified before reading it again from disk or cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant