- the search request cache can now get as large as 1000 entries
- if more entries arrive, unused are deleted
- the elements may stay in the cache up to 10 minutes and longer if they are used
- the elements are deleted earlier that 10 minutes if the memory gets low
This commit was mainly done for metager-feeding peers that have a query load of 50000 queries each day. Also added:
- a monitor for cache hit/cache miss in PerformanceMemory_p.html (see at bottom of page)
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7093 6c8d7289-2bf4-0310-a012-ef5d649a1542
privatestatic ConcurrentHashMap<String,SearchEvent>lastEvents=newConcurrentHashMap<String,SearchEvent>();// a cache for objects from this class: re-use old search requests
publicstaticfinallongeventLifetime=60000;// the time an event will stay in the cache, 1 Minute
privatestaticARC<String,SearchEvent>lastEvents=newConcurrentARC<String,SearchEvent>(1000,Runtime.getRuntime().availableProcessors()*4);// a cache for objects from this class: re-use old search requests
publicstaticfinallongeventLifetime=600000;// the time an event will stay in the cache, 10 Minutes