The entity.memory_cache service used by the entity storage handlers to store loaded entities in memory has changed to a LRU (least recently used) cache.
By default, this cache keeps up to 1,000 entities in memory and then makes room for more by removing the least recently used entity from memory. We estimate that 1,000 entities will equate to roughly 200MB of memory.
Migrations
Sites running migrations on some (free) hosting plans with a memory limit of, say, 128MB may now get the following error.
Memory usage is now @usage (@pct% of limit @limit), not enough reclaimed, starting new batch
This is because the memory is no longer manually freed up whenever we do a memory usage check.
We recommend lowering the number of entity.memory_cache.slots. This limit is set using the entity.memory_cache.slots container parameter in core.services.yml.
entity.memory_cache.slots: 1000