On Thu, 2023-07-13 at 19:44 +0000, Eliot Kimber wrote:
In the context of a RESTXQ handler that is processing a stored document to generate HTML From it, I need to do some expensive processing and then cache the result for the next time the same document is rendered.
For fromoldbooks.org/Search i use a cache on the front end, outside BaseX. The one is use is custom code, but there are off the shelf ones now. If the data is sensitive, there's a danger of http injection attacks with this approach, especially with POST queries, so check for the cache's story on security (more details on request). For the front page (www.fromoldbooks.org) i use memcached, because what's served doesn't depend on query parameters. liam -- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org