I gave some code for the request:
Cache cache = cacheManager.getCache("forumPageCache");
cache.put("forum_1_page_1", postListInForum1Page1);
cache.put("forum_1_page_2", postListInForum1Page2);
cache.put("forum_1_page_3", postListInForum1Page3);
cache.put("forum_2_page_1", postListInForum2Page1);
cache.put("forum_2_page_2", postListInForum2Page2);
When forum2 got a new post, then the page1 & page2 of forum2 should be
stale and must be removed,
while all pages in forum1 remained valid.
My request : I should remove the stale cache entries ("forum_2_page1"
& "forum_2_page2") by a maintainable manner?
I want to do some search like this
List<String> cacheKeys = myCacheKeySearcher.doSearch(new
SearchCriteria("forumId = 2"));
for (String key : cacheKeys) {
cache.remove(key);
}
Normally the search capability will be implemented by a lucene
in-memory IndexSearcher.
And I'll use a CacheEventListener or some AOP interceptor to
synchronize the cache keys
to the keys index store.
My problem is:
While I could index and search all the index keys in one JVM, how
could I synchronized the
keys index store (a lucene memory store) across the cluster?
-Wesley
_______________________________________________
resin-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/resin-interest