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

caching function that returns mutable produces confusing behaviour #6

Closed
cmcaine opened this issue Jan 30, 2019 · 2 comments
Closed

Comments

@cmcaine
Copy link

cmcaine commented Jan 30, 2019

Unclear how to fix this nicely - maybe you want your function to return a reference to the same mutable struct each time and you don't mind that the contents of that struct has changed between function calls?

In my case I've just split my function up so I can cache the immutable string I get from a glorified HTTP.get() operation and I parse the string into a Dict later.

Anyway, I think this should maybe be documented?

@zgornel
Copy link
Owner

zgornel commented Jan 30, 2019

Could you provide a minimal example of the issue/bug you are refering to?

@zgornel
Copy link
Owner

zgornel commented Jun 8, 2019

Closing for lack of details.

@zgornel zgornel closed this as completed Jun 8, 2019
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