<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 21, 2013 at 6:07 PM, Galder Zamarreño <span dir="ltr">&lt;<a href="mailto:galder@redhat.com" target="_blank">galder@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On May 6, 2013, at 2:20 PM, Mircea Markus &lt;<a href="mailto:mmarkus@redhat.com">mmarkus@redhat.com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; On 3 May 2013, at 20:15, Paul Ferraro wrote:<br>
&gt;<br>
&gt;&gt; Is it essential?  No - but it would simplify things on my end.<br>
&gt;&gt; If Infinispan can&#39;t implement expiration notifications, then I am forced<br>
&gt;&gt; to use immortal cache entries and perform expiration myself.  To do<br>
&gt;&gt; this, I have to store meta information about the cache entry along with<br>
&gt;&gt; my actual cache values, which normally I would get for free via mortal<br>
&gt;&gt; cache entries.<br>
&gt;<br>
&gt; In the scope of 5.2, what galder suggested was to fully support notifications for the entries in memory. In order to fully support your use case you&#39;d need to add some code to trigger notifications in the cache store as well - I think that shouldn&#39;t be too difficult. What cache store implementation are you using any way?<br>


<br>
</div>^ Personally, I&#39;d do in-memory entry expiration notifications for 5.2, and I&#39;d leave cache store based entry expiration for 6.0, when we&#39;ll revisit cache store API, and we can address cache store based entry expiration notification properly.<br>


<br>
Agree everyone?<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Agree, if you meant for 5.3 :)<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">
&gt;<br>
&gt;&gt;<br>
&gt;&gt; So, it would be nice to have.  If I have to wait for 6.0 for this,<br>
&gt;&gt; that&#39;s ok.<br>
&gt;&gt;<br>
&gt;&gt; On Thu, 2013-05-02 at 17:03 +0200, Galder Zamarreño wrote:<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Re: <a href="https://issues.jboss.org/browse/ISPN-694" target="_blank">https://issues.jboss.org/browse/ISPN-694</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; We&#39;ve got a little problem here. Paul requires that entries that might<br>
&gt;&gt;&gt; have been expired while in the cache store, when loaded, we send<br>
&gt;&gt;&gt; expiration notifications for them.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The problem is that expiration checking is currently done in the<br>
&gt;&gt;&gt; actual cache store implementations, which makes supporting this (even<br>
&gt;&gt;&gt; outside the purgeExpired business) specific to each cache store. Not<br>
&gt;&gt;&gt; ideal.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The alternative would be for CacheLoaderInterceptor to load, do the<br>
&gt;&gt;&gt; checks and then remove the entries accordingly. The big problem here<br>
&gt;&gt;&gt; is that you&#39;re imposing a way to deal with expiration handling for all<br>
&gt;&gt;&gt; cache store implementations, and some might be able to do these checks<br>
&gt;&gt;&gt; and removals in a more efficient way if they were left to do it<br>
&gt;&gt;&gt; themselves. For example, having to load all entries and then decide<br>
&gt;&gt;&gt; which are to expire might require a lot of work, instead of<br>
&gt;&gt;&gt; potentially communicating directly with the cache store (imagine a<br>
&gt;&gt;&gt; remote cache store…) and asking it to return all the entries filtered<br>
&gt;&gt;&gt; by those whose expiry has not expired.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; However, even if a cache store can do that, it would lead to loading<br>
&gt;&gt;&gt; only those entries not expired, but then how do you send the<br>
&gt;&gt;&gt; notifications if those expired entries have been filtered out? You<br>
&gt;&gt;&gt; probably need multiple load methods here...<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; @Paul, do you really need this for your use case?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The simplest thing to do might be to go for option 1, and let each<br>
&gt;&gt;&gt; cache store send notifications for expired entries for the moment, and<br>
&gt;&gt;&gt; then in 6.0 revise not only the API for purgeExpired, but also the API<br>
&gt;&gt;&gt; for load/loadAll() to find a way that, if any expiry listeners are in<br>
&gt;&gt;&gt; place, a different method can be called on the cache store that<br>
&gt;&gt;&gt; signals it to return all entries: both expired and non-expired, and<br>
&gt;&gt;&gt; then let the CacheLoaderInterceptor send notifications from a central<br>
&gt;&gt;&gt; location.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thoughts?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Galder Zamarreño<br>
&gt;&gt;&gt; <a href="mailto:galder@redhat.com">galder@redhat.com</a><br>
&gt;&gt;&gt; <a href="http://twitter.com/galderz" target="_blank">twitter.com/galderz</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Project Lead, Escalante<br>
&gt;&gt;&gt; <a href="http://escalante.io" target="_blank">http://escalante.io</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Engineer, Infinispan<br>
&gt;&gt;&gt; <a href="http://infinispan.org" target="_blank">http://infinispan.org</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
&gt; Cheers,<br>
&gt; --<br>
&gt; Mircea Markus<br>
&gt; Infinispan lead (<a href="http://www.infinispan.org" target="_blank">www.infinispan.org</a>)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
--<br>
Galder Zamarreño<br>
<a href="mailto:galder@redhat.com">galder@redhat.com</a><br>
<a href="http://twitter.com/galderz" target="_blank">twitter.com/galderz</a><br>
<br>
Project Lead, Escalante<br>
<a href="http://escalante.io" target="_blank">http://escalante.io</a><br>
<br>
Engineer, Infinispan<br>
<a href="http://infinispan.org" target="_blank">http://infinispan.org</a><br>
<br>
<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div></div>