Re: Кэширование данных в ORM
От: hiron  
Дата: 20.06.06 15:42
Оценка: 1 (1)
Здравствуйте, Risotto, Вы писали:

R>Как реализовано кэширование таким образом, например в Hibernate, что если были внесены измененияв в базу данных, то эти изменения будут реплицироваться в кэше? Какие есть подходы?

Если вы имеете в виду что другое приложение изменяет данные в базе, то никак. Вот цитата из HiA p. 178-179
Many Java applications share access to their database with other (legacy) applications. In this case, you shouldn’t use any kind of cache beyond a transaction scope cache. There is no way for a cache system to know when the legacy application updated the shared data. Actually, it’s possible to implement application-level functionality to trigger an invalidation of the process (or cluster) scope cache when changes are made to the database, but we don’t know of any standard or best way to achieve this. Certainly, it will never be a built-in feature of Hibernate. If you
implement such a solution, you’ll most likely be on your own, because it’s extremely specific to the environment and products used.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.