On Thu, 2022-05-05 at 12:10 +0200, Christian Grün wrote:
contents will be written to disk at shutdown time
What happens on a crash (e.g. power failure)?
E/g/ for the listtle teszt/experiment site i have at www.fromoldbooks.org (and www.fromoldbooks.org/Search/) there's a framework i wrote that calls out to BaseX and keeps a cached result in a separate file, one per query. The cache is deleted entirely on any update, which is not optimal but was easy :) and a background process repopulates it based on popular queries. The cache can get up to a few gigabytes sometimes.
These days for most of the queries, BaseX is faster than the framework, so the site would speed up without it :) but there are a few that can be slow, and the cache reduces server load when someone's bot goes crazy.
Philosophy question: Is a cache so different from a view in SQL, a constructed dynamic table?