Subject Re: [Firebird-Java] Responding to Firebird events
Author Roman Rokytskyy
> - thanks a lot for useful information, but for now (because of hastiness
> :-( , I am looking for a good caching strategy with regard on db data
> changes.

I am not sure if event can help you. They tell only that some event is
happened (for example, that some table is changed), but they do not tell
which records are changed. In this case you would need to re-read complete
table.

If you assume that rollbacks are rare in your system, you can write an UDF
that will send some information via network sockets and call this UDF in
each AFTER UPDATE/DELETE trigger. There will be false notifications for the
changes that are rolled back, but if the rate is low, it will not affect
your application.

> So, how to properly detect database data changes, and invalidate cached
> data in the application ?

Let all data changes go through a middle tier, cache them there and
invalidate them there?

Roman