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

Allow refreshing tile cache #291

Merged
merged 4 commits into from
Dec 5, 2023
Merged

Conversation

Carifio24
Copy link
Member

This PR resolves #290 by adding functionality to allow refreshing the tile cache. The engine-level implementation is based on the existing functionality from the Windows client here. I've retained the try-catch nature of the cache clearing in case some particular tile type's cleanUp can throw. This new functionality is also exposed to the Pinia layers and the research app messaging so that it can be used in downstream clients (e.g. pywwt).

Since the tile cache isn't really something that clients should be manipulating directly, the only function that I've exposed to the Pinia layer is this new method here. Obviously this doesn't place any restriction at the engine JS level, though.

@pkgw
Copy link
Contributor

pkgw commented Dec 3, 2023

This looks good. My only requests would relate to the documentation: the TS-level and app-message level docs should describe when you might want to use this API and (presumably) give the general message that it should only be used rarely.

The other piece of the documentation is that with these large APIs, we try to maintain more-or-less-formal indexes of all of the methods, so new methods need to be added to those in appropriate places. For the JSON messages, I guess that would be in the research-app-messages overview. For the Pinia API, that would be in the engineStore overview.

We have enough of an API surface area and enough stakeholders that adding sufficient documentation is really an important part of maintaining the engine codebase.

@pkgw pkgw merged commit aa27ced into WorldWideTelescope:master Dec 5, 2023
9 checks passed
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.

Allow clearing tile cache
2 participants