-
Notifications
You must be signed in to change notification settings - Fork 37
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
Enhancement - optional re-scan time #8
Comments
I assume when you say "changing the views" you mean switching from manifests to pkgsinfo or vice-versa. I worry about doing any sort of caching -- there's so much room for BAD THINGS to happen if what is displayed doesn't match the current state of the filesystem. Of course, on the other hand, the list never refreshes when idle, so if you switch to the manifests view and leave it idle, other people/processes could add and remove items and the web-displayed list would be inaccurate then as well. This could possibly be addressed with a refresh timer, but with big lists of items, if no-one else is changing them, now periodically you get to wait for a refresh that doesn't actually change anything! As long as MunkiWebAdmin2 must live alongside other methods of managing/changing a repo, this will be a hard problem. |
Agreed. I was also thinking about an automatic refresh time, but that could be dangerous if you are mid-edit as well. Definitely a difficult issue to "address". There are many consequences either way. |
If the repo is in git, git hooks could be used to keep the cache up to date. Perhaps offer a command line tool to refresh the cache so people could implement their own method of keeping the cache up-to-date. So something external like a git hook triggers mwacli --update-cache, which sends a notification to browser clients to refresh. In any case, I think clients would need to be polling or have an open websocket. |
I have absolutely no idea what any of this means, so it's very unlikely you'd see any sort of implementation from me... |
Understandably, when changing the views, all content is re-scanned.
If there are a large amount of manifests/packages, this could take a bit of time. Perhaps rather than re-scanning between view changes, it should only occur if the last page view time has elapsed a specific time (say more than 3 minutes).
This is merely an idea. The consequence of such a change is the admin may not see the item they are looking for in between this window.
The text was updated successfully, but these errors were encountered: