Xpages - detect view change

I’m trying to create autorefresh function that would refresh view data when changed. Since I don’t want to reload data every time I’m looking at options to detect the change.

So far I’m using count of allviewentries, but it only works when number of documents changes. View properties isModified and lastModified don’t seem to work. IsModified always returns true and LastModified returns modification of probably design, not date.

Any idea how to efficiently solve this?

LastModified on database level seems could help, but I would rather stay at view level.

Thanks,

Martin