The caching settings for the LocalSessionFactory bean are basically the same as if you had a non-spring managed session factory
The entity and collection cache strategies settings on the LocalSessionFactory map to the class and collection settings..
i.e.
Code:
<hibernate-configuration>
<session-factory
name="java:hibernate/SessionFactory">
<!-- properties -->
. . .
<!-- mapping files -->
<mapping resource="org/hibernate/auction/Item.hbm.xml"/>
<mapping resource="org/hibernate/auction/Bid.hbm.xml"/>
<!-- cache settings -->
<class-cache class="org.hibernate.auction.Item" usage="read-write"/>
<class-cache class="org.hibernate.auction.Bid" usage="read-only"/>
<collection-cache class="org.hibernate.auction.Item.bids" usage="read-write"/>
</session-factory>
</hibernate-configuration>
I am not sure if / why you would mix and match SessionFactory and HBM level configuration... however I would assume it would be an "AND" situation.