t2v / play2-auth

Play2.x Authentication and Authorization module
Apache License 2.0
608 stars 142 forks source link

Use CacheApi in play 2.4.x #155

Open y0t4 opened 9 years ago

y0t4 commented 9 years ago

Hi

In Play 2.4.x, use play.api.cache.CacheApi (https://www.playframework.com/documentation/2.4.x/ScalaCache). So, I changed AuthConfig trait and CacheIdContainer like this (https://github.com/y0t4/play2-auth/commit/89ee5f51460a0802bd83c325f435226ab3bd277c), and I want to send PR.

But if merge this branch, it will be affected in many places. (tests, documents, samples, ...) So, I think we may want to prepare branch for updates.

What do you think?

gakuzzzz commented 9 years ago

Hi, thanks for proposal!

It seems cool. I think it is good that CacheIdContainer accepts CacheApi in constructor. However I dont think it is good that AuthConfig has the cacheApi fields. Because the users who use another IdContainer implementation instead of CacheIdContainer dont need cacheApi and CacheApi dependencies...

y0t4 commented 9 years ago

use another IdContainer implementation instead of CacheIdContainer

Oops. I forgot that pattern.

So, I'll remove cacheApi field from AuthConfig. And then, idContainer field will be needed to be abstract. Like this( https://github.com/t2v/play2-auth/compare/master...y0t4:use_CacheApi )

Is it ok?

gakuzzzz commented 8 years ago

sorry too late reply.

Yes, that's right! thanks!

gregghz commented 8 years ago

What's the status of this?

I'd love to be able to use the CacheAPI. :)