lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2474) Allow to plug in a Cache Eviction Listener to IndexReader to eagerly clean custom caches that use the IndexReader (getFieldCacheKey)
Date Mon, 24 May 2010 10:30:26 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870559#action_12870559
] 

Michael McCandless commented on LUCENE-2474:
--------------------------------------------

Should we rename this to "CloseEventListener"?  Ie, when an IR is closed it'll notify those
subscribers who asked to find out?

Also, shouldn't the FieldCache's listener be created/installed from FieldCache, not from IR?
 Ie, when FieldCache creates an entry it should at that point ask the reader to notify it
when that reader is closed?

> Allow to plug in a Cache Eviction Listener to IndexReader to eagerly clean custom caches
that use the IndexReader (getFieldCacheKey)
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2474
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2474
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Shay Banon
>         Attachments: LUCENE-2474.patch
>
>
> Allow to plug in a Cache Eviction Listener to IndexReader to eagerly clean custom caches
that use the IndexReader (getFieldCacheKey).
> A spin of: https://issues.apache.org/jira/browse/LUCENE-2468. Basically, its make a lot
of sense to cache things based on IndexReader#getFieldCacheKey, even Lucene itself uses it,
for example, with the CachingWrapperFilter. FieldCache enjoys being called explicitly to purge
its cache when possible (which is tricky to know from the "outside", especially when using
NRT - reader attack of the clones).
> The provided patch allows to plug a CacheEvictionListener which will be called when the
cache should be purged for an IndexReader.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message