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 documentation does not mention "sync" attribute. [SPR-14366] #18938

Closed
spring-projects-issues opened this issue Jun 15, 2016 · 1 comment
Closed
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jun 15, 2016

Angus Mezick opened SPR-14366 and commented

The documentation at http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html does not mention the new sync=true flag as described in this blog post:
https://spring.io/blog/2016/03/04/core-container-refinements-in-spring-framework-4-3#cache-abstraction-refinements

This description in the javadocs also left me confused as to what was actually happening. http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/cache/annotation/Cacheable.html#sync--
The javadocs say the attribute is a hint to the cache provider (ehcache for me) and the blog post says that the framework(Spring) will handle the blocking of threads.


Affects: 4.3 GA

Reference URL: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jun 16, 2016

Stéphane Nicoll commented

Thanks for raising this issue, it's an oversight.

As for the confusing part, here's what I wrote

tells the framework to block any concurrent threads while the value is being computed.

By that I meant, "instruct the framework to do X". That doesn't mean that some provider behind the scenes may not support it. Some don't. For instance, Hazelcast doesn't at the moment but there's a pull request that implements it.

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

Successfully merging a pull request may close this issue.

None yet
2 participants