ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chema <demablo...@gmail.com>
Subject Question about cache model
Date Tue, 09 Jun 2009 08:45:05 GMT
Hello:
.

I've got a query which retrieves a state name from a code. Values
don't change for long  time and tabla is small, so cache them is a
good idea. But I don't know what type of cache should use.

MEMORY/WEAK , about docs, would be the best choice because I don't
have a pattern of object reuse. But I think if I let to the GC manages
when flushing cache, I've doubts about if this will avoid unnecessary
queries. When the activity of application lows , all cached objects
will be lost. With MEMORY/STRONG ,  I guess it would be a waste of
memory.
With LRU, the situation, maybe, would be the same than MEMORY/STRONG

What is the best strategy to caching values stored in small catalog
tables ( I mean,  values don't change for long  time ) ?

Is it good thing to set a flushInterval in all cache model ?


Thanks and regards

Mime
View raw message