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

EES-5707 Remove geojson cache file after updating data block with map #5516

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

mmyoungman
Copy link
Collaborator

This PR removes associated geo json cache files (controlled by LocationsForDataBlockCacheKey) after a data block is updated.

This is to prevent a bug where if someone caches geo json for a data set that has two locations with the same name, and then update the data block to include both locations of the same name, the user won't be able to look at the data block chart without getting a Sorry page. This would continue until the cache file had been removed. See EES-5704 for details.

This hasn't solved the issue entirely - if you update a data block the Content page may still lead to a Sorry page, but refreshing the page will fix this. This has been deemed acceptable for now.

Comment on lines +237 to +238
await _cacheService.DeleteItemAsync(
new LocationsForDataBlockCacheKey(dataBlockVersion, mapChart.BoundaryLevel));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just wondering if there are any other places we should be invalidating the geojson cache, like if the data is replaced?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Discussed this with Ben and Cam on Slack. We think the geojson cache isn't being invalidated for replacements, but we think that probably isn't an issue. We decided to not do anything about replacements immediately and highlight this case for testing.

@mmyoungman mmyoungman merged commit 51e2239 into dev Jan 10, 2025
10 checks passed
@mmyoungman mmyoungman deleted the EES-5707 branch January 10, 2025 11:06
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.

2 participants