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-projects-issues opened this issue Jul 28, 2016 · 1 comment
Closed

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

spring-projects-issues opened this issue Jul 28, 2016 · 1 comment
Assignees
Labels
in: core status: declined type: enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues 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-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues 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.

@spring-projects-issues spring-projects-issues added status: declined type: enhancement in: core labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: declined type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants