[keycloak-dev] SKIP_CACHE_STORE for Infinispan
Marek Posolda
mposolda at redhat.com
Thu Aug 9 03:16:23 EDT 2018
On 08/08/18 07:50, Poiffaut Romain wrote:
> Hi,
>
> I am currently looking into the Infinispan cache usage in Keycloak.
> While reading the source code, I discovered InfinispanChangeLogBasedTransaction decorates the cache with SKIP_CACHE_STORE flag. This flag has been added to resolve KEYCLOAK-5656 regarding multiple DC.
>
> This fix has the side effect of preventing to persist the infos in an external cache store.
>
> What do you think about adding a mechanism to enable/disable this behavior according to the needs ?
Yes, I think it will be good. Feel free to create JIRA for this.
ATM we're not testing with cacheStore/cacheLoader enabled, so the
regression is possible as you pointed.
For fixing this, I think we don't even need to introduce some new
configuration option. We can probably detect the flags based on the fact
if the cacheStore/cacheLoader is remote-store (then use flags) or some
other store like JDBC , File or something else (then not use flags).
BTV. There is possible workaround for this issue, that you configure
Keycloak with the remote-store, which will point to some external
infinispan/JDG server. Then on the caches on the JDG side, you will
configure the JDBC or File store. I know this is not ideal as you will
need the JDG server just to workaround this limitation. Also no
guarantee everything will work as expected as we didn't test this setup
(I just guess that it will work as a workaround).
Marek
>
> Best regards,
> Romain
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
More information about the keycloak-dev
mailing list