102103104105106107108109110111112113
bind(UserCache.class).toProvider(new Provider<UserCache>() { public UserCache get() { final Cache cache = CacheManager.getInstance().getCache(USER_DETAILS_CACHE_NAME); assert cache != null; final EhCacheBasedUserCache uc = new EhCacheBasedUserCache(); uc.setCache(cache); return uc; } }).in(Scopes.SINGLETON);