I currently use Jpa via Hibernate in my application. Since spring security oauth2 provides JdbcTokenStore, I started using it. But the problem with that is, I cannot use cache (which all my entities in the application currently share).

It hits the database in a separate flow.

I am thinking implementing **JpaTokenStore** thats backed by Jpa & leverage the cache advantages that comes with it.

Did anyone try implementing this/see any downsides using this approach?