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

make LoadParameters immutable #140

Open
bossie opened this issue Sep 26, 2022 · 1 comment
Open

make LoadParameters immutable #140

bossie opened this issue Sep 26, 2022 · 1 comment

Comments

@bossie
Copy link
Collaborator

bossie commented Sep 26, 2022

load_collection caching was fixed as part of Open-EO/openeo-geotrellis-extensions#74; this made an issue apparent with LoadParameters: a mutable object that's part of a cache key has some undesired consequences.

In this case mutating the existing LoadParameters object also modified it it the cache key, and getting a value from the cache with the new cache key returned the value for the old cache key.

Making LoadParameters immutable like EvalEnv would prevent this kind of mistakes.

@soxofaan
Copy link
Member

Immutability FTW!

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

No branches or pull requests

2 participants