[Xapian-discuss] Reopening database
Francis Irving
francis at flourish.org
Wed Apr 30 10:13:38 BST 2008
Hi,
In my application I have one writer (on a cron job), and multiple
readers which are inside the Mongrel Ruby on Rails web server.
When I alter the database, the readers don't see the changes until the
webserver is next restarted - I'm caching the database connection so
it doesn't reopen each query.
Which of the following is the best fix...
- Is there some way of getting Xapian to detect that the database has
been written to? So I can reopen it exactly when needed. e.g.
I looked for a way of programmatically reading the revision number
or similar, but got nowhere (maybe can use filesystem time stamps?).
- Should I just reopen it every request, will that have much
performance cost? That is what seems to happen in PHP, and it's OK.
- Something else :)
Francis
More information about the Xapian-discuss
mailing list