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

Delete CachingMode.GROUP #798

Closed
raniejade opened this issue Sep 25, 2019 · 4 comments · Fixed by #859
Closed

Delete CachingMode.GROUP #798

raniejade opened this issue Sep 25, 2019 · 4 comments · Fixed by #859

Comments

@raniejade
Copy link
Member

Using CachingMode.GROUP in 2.0.9 is considered as a compilation error, drop it in the next release.

@raniejade raniejade added this to the 2.0.10 milestone Sep 25, 2019
@robstoll
Copy link
Contributor

robstoll commented Oct 11, 2019

What should be used instead? SCOPE?
And another question in a similar area, the LifecycleListener does not provide the methods beforeScope/afterScope: how I am supposed to know when a memoized value gets out of its cachingMode-scope? should I use memoized(... descrutor) for that purpose?

@raniejade
Copy link
Member Author

What should be used instead? SCOPE?

Use CachingMode.EACH_GROUP, it was poorly named.

the LifecycleListener does not provide the methods beforeScope/afterScope

Use beforeGroup/afterGroup. From the top of my head, the following pairs have the same semantics:

  • CachingMode.SCOPE -> beforeGroup/afterGroup
  • CachingMode.EACH_GROUP (previously known as CachingMode.GROUP) -> beforeEachGroup/afterEachGroup
  • CachingMode.TEST -> beforeEachTest/afterEachTest

how I am supposed to know when a memoized value gets out of its cachingMode-scope? should I use memoized(... descrutor) for that purpose?

I'm not following, can you give an example?

@robstoll
Copy link
Contributor

Ah OK. I won't bother you with my problem I guess I have to use the destructor anyway. Btw. There isn't a beforeGroup/afterGroup on the lifecyclelistener

@raniejade
Copy link
Member Author

Btw. There isn't a beforeGroup/afterGroup on the lifecyclelistener

Intentional, LifecycleListener is meant for notifying when a scope (group/test) is executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants