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

[cache] add 'cached_method_call' and use it in DiscretizationInterface.solve #231

Merged
merged 2 commits into from
Mar 10, 2016

Conversation

sdrave
Copy link
Member

@sdrave sdrave commented Mar 9, 2016

This prevents a cache miss for the second solve call in the following example, since parse_parameter is now called before handing the arguments to the caching code.

d.solve(1.)
d.solve(d.parse_parameter(1.))

cached_method_call allows to call a method of an CacheableInterface
instance with caching, even when the method has not been decorated with
'cached'.
This allows us to call parse_parameter on mu before passing it to the
cache key generation, making cache lookup more robust.
@sdrave sdrave added this to the 0.4 milestone Mar 9, 2016
@sdrave
Copy link
Member Author

sdrave commented Mar 9, 2016

@ftalbrecht, this is what we had discussed earlier for the LRBMS code.

@ftalbrecht
Copy link
Contributor

Yes, very nice!

sdrave added a commit that referenced this pull request Mar 10, 2016
[cache] add 'cached_method_call' and use it in DiscretizationInterface.solve
@sdrave sdrave merged commit 664e8ce into master Mar 10, 2016
@sdrave sdrave deleted the cached_method_call branch May 17, 2016 10:37
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