I’m porting JSDB to EcmaScript Modules (ESM) and one of the issues I had to look into was module cache invalidation. JSDB is my little in-memory native JavaScript Database that writes JavaScript operations to append-only JavaScript logs that have UMD headers. And it loads in these tables either via a dynamic require() call, or, for very large tables, by streaming them in and evaluating them line by line1. When a table is loaded in, it is stored in the require cache.