{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2633","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2633/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2633/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2633/events","html_url":"https://github.com/spring-projects/spring-boot/issues/2633","id":60633140,"number":2633,"title":"Caching auto-configuration","user":{"login":"snicoll","id":490484,"avatar_url":"https://avatars.githubusercontent.com/u/490484?v=3","gravatar_id":"","url":"https://api.github.com/users/snicoll","html_url":"https://github.com/snicoll","followers_url":"https://api.github.com/users/snicoll/followers","following_url":"https://api.github.com/users/snicoll/following{/other_user}","gists_url":"https://api.github.com/users/snicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/snicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicoll/subscriptions","organizations_url":"https://api.github.com/users/snicoll/orgs","repos_url":"https://api.github.com/users/snicoll/repos","events_url":"https://api.github.com/users/snicoll/events{/privacy}","received_events_url":"https://api.github.com/users/snicoll/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"snicoll","id":490484,"avatar_url":"https://avatars.githubusercontent.com/u/490484?v=3","gravatar_id":"","url":"https://api.github.com/users/snicoll","html_url":"https://github.com/snicoll","followers_url":"https://api.github.com/users/snicoll/followers","following_url":"https://api.github.com/users/snicoll/following{/other_user}","gists_url":"https://api.github.com/users/snicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/snicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicoll/subscriptions","organizations_url":"https://api.github.com/users/snicoll/orgs","repos_url":"https://api.github.com/users/snicoll/repos","events_url":"https://api.github.com/users/snicoll/events{/privacy}","received_events_url":"https://api.github.com/users/snicoll/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/37","html_url":"https://github.com/spring-projects/spring-boot/milestones/1.3.0.M1","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/37/labels","id":1109859,"number":37,"title":"1.3.0.M1","description":"","creator":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars.githubusercontent.com/u/914682?v=3","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":155,"state":"open","created_at":"2015-05-14T08:31:04Z","updated_at":"2015-06-02T09:27:30Z","due_on":"2015-06-03T07:00:00Z","closed_at":null},"comments":9,"created_at":"2015-03-11T09:48:12Z","updated_at":"2015-06-02T09:27:31Z","closed_at":"2015-06-02T09:27:30Z","body":"Given the revisited support as of Spring Framework 4.1, it would be nice to provide a better support for caching in Boot. There was already a failed attempt (#1553) and a recent PR for ehcache (#2602) brought the idea back to life.\r\n\r\nWe need this thing to be opt-in as the mere presence of a caching library in the classpath is no good reason to enable it. Fortunately (thanks @dsyer !) we can rely on the presence of `@EnableCaching` (more specifically a `CacheAspectSupport` bean). \r\n\r\nThese are the things we could auto-configure:\r\n\r\n* Redis\r\n* EhCache (via `ehcache.xml` on the classpath)  - #2602\r\n* JSR-107 (via the presence of a default JSR-107 provider)\r\n* \"Simple\" `ConcurrentHashMap` which would be the fallback if `@EnableCaching` is on and no caching library was found. It would be nice to draw the attention with a log of some form\r\n\r\nRoot namespace would be `spring.cache` with dedicated namespace for each solution (i.e. `spring.cache.ehcache`).\r\n\r\nWe could also go further and offer easy configuration of, for instance, `Guava` caches thought I doubt it will be handy via configuration properties (maybe yaml would offer a better experience?)\r\n\r\nOf course, all this should back-off if a `CacheManager` has been defined. `spring.cache.mode` is a key that defines the actual system to auto-configure when the user wants to be explicit with a deterministic order on our end (i.e. simple hash map < ehcache).\r\n"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/107884563","html_url":"https://github.com/spring-projects/spring-boot/issues/2633#issuecomment-107884563","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2633","id":107884563,"user":{"login":"snicoll","id":490484,"avatar_url":"https://avatars.githubusercontent.com/u/490484?v=3","gravatar_id":"","url":"https://api.github.com/users/snicoll","html_url":"https://github.com/snicoll","followers_url":"https://api.github.com/users/snicoll/followers","following_url":"https://api.github.com/users/snicoll/following{/other_user}","gists_url":"https://api.github.com/users/snicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/snicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicoll/subscriptions","organizations_url":"https://api.github.com/users/snicoll/orgs","repos_url":"https://api.github.com/users/snicoll/repos","events_url":"https://api.github.com/users/snicoll/events{/privacy}","received_events_url":"https://api.github.com/users/snicoll/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T09:27:30Z","updated_at":"2015-06-02T09:27:30Z","body":"Let's resolve this theme for now and create individual issues for the things we'd improve in the next milestone."}}