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

Lookup Cache from Application Context [SPR-14519] #19088

Closed
spring-issuemaster opened this issue Jul 28, 2016 · 1 comment
Closed

Lookup Cache from Application Context [SPR-14519] #19088

spring-issuemaster opened this issue Jul 28, 2016 · 1 comment

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Jul 28, 2016

Phill Escott opened SPR-14519 and commented

When using the @Cacheable or @CacheConfig annotations you are unable to reference Cache by their bean name they're registered with in the Application Context.

Pull Request


No further details from SPR-14519

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jul 28, 2016

Stéphane Nicoll commented

Thank you so much for the pull request but I am not really keen on having an implementation that does that. You could create a SimpleCacheManager as follows:

@Bean
public CacheManager cacheManager(Collection<Cache> caches) {
  SimpleCacheManager cacheManager = new SimpleCacheManager();
  cacheManager.setCaches(caches);
  return cacheManager;
}

That's 3 lines so that doesn't deserve an explicit type IMO.

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
You can’t perform that action at this time.