AnsweredAssumed Answered

Caching search queries with ehcache

Question asked by hbf on Oct 17, 2007
Hi,

Our end-user GUI shows counts for the number of nodes in the various categories. For example it displays


  Regions
  - OCEANIA (12)
    - Polynesia (3)
    - Micronesia (2)
    - Australia and New Zealand (0)
    - Melanesia (7)
  - EUROPE (19)
    …

So there are 12 nodes tagged with (sub)tags of OCEANIA, etc. Based on the counts, we want to hide those categories that have no nodes.

My question:

* If I implement these counts via Lucene queries, can Ehcache be used to cache the results? (Or is Ehcache not the right thing for this purpose?)
* Does Ehcache simply cache for a specific amount of time, or is it smart enough to realize that the cached result needs to be erased when the tags of any node change?

I'd be glad to receive any pointers on whether Ehcache is the right thing to use here or not, or to some relevant documentation.
Many thanks,
Kaspar

Outcomes