You can use cacheModel
<cacheModels>
<cacheModel id="stock-cache" implementation="MEMORY" >
<flushInterval hours="24"/>
<property name="Type" value="Weak"/>
</cacheModel>
</cacheModels>
<resultMap id="Position_Result" class="MyApp.Position">
<result property="quantity" column="quantity" />
<result property="stock" column="ticker" select="GetTicker" />
</resultMap>
<select id="GetTicker"
resultMap="Stock_Result"
cacheModel="stock-cache" >
...
</select>
Adapt the cache model to your needs.
--
Cheers,
Gilles
<a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE">Wish List</a>