tags:

views:

25

answers:

1

0 down vote favorite

hi;

I'm using ibatis and its cache model for the first time and i cant seem to figure out at what time will the cache be filled with new results, meaning whne will the query that i'm applying cache model on be executed again to fill the cache with new results. Does it require some sort of command to get the results again or will it be done automatically? any help will be appreciated.

Thanks

A: 

As the documentation explains, it depends on the implementation setting and the CacheSize you provide for the cacheModel.

You can choose from LRU (Least Recently Used), FIFO (First In First Out) and MEMORY implementations.

In LRU, for example if you have a CacheSize of 100,

When the cache becomes full, the object that was accessed least recently will be removed from the cache.

You can set these to tune your cache appropriately.

Also, enabling the DEBUG flag in log4j for com.ibatis shows you whether or not there is a Cache miss or retrieved for each execution.

JoseK