<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 25 August 2016 at 16:31, Bill Burke <span dir="ltr"><<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I found out that if you call cache.clear() with a invalidation cache, it<br>
only clears locally and not the entire cluster. I was thinking that we<br>
could set a realm attribute of "not-valid-before" with a timestamp.<br>
When something is accessed, check the timestamp vs. the time the thing<br>
was inserted into the cache.<br></blockquote><div><br></div><div>You 100% sure? I thought I checked that it worked.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This is also important for the fine-grain cache policies I want to<br>
implement for users. I want cache policies for users. Scheduled<br>
evictions and/or max time in the cache. There could be realm-level<br>
policies for all users everywhere, and per storage provider. I also<br>
want the ability to clear the cache for a specific provider manually.<br>
Using the Infinispan stream() api, IMO, is just not feasible. We don't<br>
want to be iterating over thousands of users in the cache to see if they<br>
should be invalidated or not. There's also the issue of making sure<br>
this happens cluster-wide. So instead, just do a simple timestamp check<br>
when the user is accessed.<br></blockquote><div><br></div><div>That's not going to be sufficient as we want a mechanism to completely clear the caches. It's required for example if there's a memory problem or another issue where you want to just start fresh. I think it's just a nice fail-safe to have.</div><div><br></div><div>I don't honestly see what the purpose of a "not-valid-before" timestamp would be. It doesn't seem to cover the use-case of clearing the cache if there's an issue, so not sure what problem it's trying to solve.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Bill<br>
______________________________<wbr>_________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/keycloak-dev</a><br>
</blockquote></div><br></div></div>