|
165 | 165 | <formalpara>
|
166 | 166 | <title>Be careful</title>
|
167 | 167 | <para>
|
168 |
| - Caches are never aware of changes made to the persistent store by another process (though they may be |
169 |
| - configured to regularly expire cached data). As the caches are created at the session factory level, |
170 |
| - they are destroyed with the SessionFactory instance; so you must keep them alive as long as you need |
171 |
| - them. |
172 |
| - </para> |
173 |
| - <para> |
174 |
| - The second level cache requires the use of transactions, be it through transaction scopes or NHibernate |
175 |
| - transactions. Interacting with the data store without an explicit transaction is discouraged, and will |
176 |
| - not allow the second level cache to work as intended. |
177 |
| - </para> |
178 |
| - <para> |
179 |
| - To avoid issues with composite ids and some cache providers, <literal>ToString()</literal> needs to |
180 |
| - be overridden on composite id classes. It should yield an unique string representing the id. If the |
181 |
| - composite id is mapped as a component, overriding the component <literal>ToString()</literal> |
182 |
| - is enough. See <xref linkend="components-compositeid" />. |
| 168 | + <itemizedlist> |
| 169 | + <listitem> |
| 170 | + <para> |
| 171 | + Most caches are never aware of changes made to the persistent store by another process (though they may be |
| 172 | + configured to regularly expire cached data). As the caches are created at the session factory level, |
| 173 | + they are destroyed with the SessionFactory instance; so you must keep them alive as long as you need |
| 174 | + them. |
| 175 | + </para> |
| 176 | + </listitem> |
| 177 | + <listitem> |
| 178 | + <para> |
| 179 | + The second level cache requires the use of transactions, be it through transaction scopes or NHibernate |
| 180 | + transactions. Interacting with the data store without an explicit transaction is discouraged, and will |
| 181 | + not allow the second level cache to work as intended. |
| 182 | + </para> |
| 183 | + </listitem> |
| 184 | + <listitem> |
| 185 | + <para> |
| 186 | + To avoid issues with composite ids and some cache providers, <literal>ToString()</literal> needs to |
| 187 | + be overridden on composite id classes. It should yield an unique string representing the id. If the |
| 188 | + composite id is mapped as a component, overriding the component <literal>ToString()</literal> |
| 189 | + is enough. See <xref linkend="components-compositeid" />. |
| 190 | + </para> |
| 191 | + </listitem> |
| 192 | + </itemizedlist> |
183 | 193 | </para>
|
184 | 194 | </formalpara>
|
185 | 195 | <para>
|
|
0 commit comments