<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 24 Mar 2009, at 15:02, Brian Stansberry wrote:</div><div><br></div><div>&lt;SNIP /></div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite"><blockquote type="cite"><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">1. &nbsp;Drop MRU and LFU. &nbsp;I don't see MRU being useful except in very specific edge cases. &nbsp;LRU somewhat useful but very expensive.</span></blockquote></blockquote><br>Did you mean "LFU somewhat useful"? If so, yeah, agreed.</div></blockquote><div><br></div><div>Yes, LFU.</div><br><blockquote type="cite"><div><blockquote type="cite"><blockquote type="cite">2. &nbsp;Re-introduce a time-based watermark. &nbsp;Brian, this is where your thoughts are most useful - how do you see this being used? &nbsp;In passivation?<br></blockquote></blockquote><br>Theoretically it's important for passivation, but in practice I find it makes more sense to let the web/sfsb container decide what gets passivated. So don't let AS passivation drive this.<br><br>For entity caching, supporting maxAge is very important as that allows guaranteed flushing of stale data from the cache; important in use cases where other systems may update the DB making the cache invalid, but the application is willing to accept that for a certain period.</div></blockquote><div><br></div><div>Right. &nbsp;I have this in the form of lifespans, which can be set either cache-wide or per-entry.</div><br><blockquote type="cite"><div>Eviction based on time-since-last-access I think is more of a convenience. It helps shield users from needing to think about # of nodes; they can just reason "if this data hasn't been used in 5 minutes, I don't need it." A nice heuristic.<br><br>With the flat structure the problem of reasoning about number of nodes is a bit less, since structural nodes are gone.<br><br>My gut feeling on this is that eviction based on time-since-last-access is not strictly necessary but if you take it away you'll get lots of grumbling.</div></blockquote><div><br></div><div>I've found a way to introduce it easily enough with minimal impact/cost. &nbsp;It would sit alongside lifespan, as a maxIdle time.</div><br><blockquote type="cite"><div><blockquote type="cite"><blockquote type="cite"></blockquote></blockquote></div></blockquote></div>Cheers<br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-infinispantal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-infinispantal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div>Lead, JBoss Cache</div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a><br><a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>