IDEA-100471 Make DOM caches memory-sensitive