Page MenuHomePhabricator

mw.wikibase.lua.cacheEntity is supposed to implement a LRU but implements a FIFO
Closed, InvalidPublic

Description

The Lua function mw.wikibase.lua.cacheEntity is supposed to implement a LRU but implements a FIFO. While this works it creates a lot of unnecessary cache misses.

It is pretty straight forward to fix it; simply recreate the cacheOrder with entityId as first item, remove all other references to this item, and drop the overflowing item.

Some of the Lua modules should get a much lower load, and I guess it should even be visible on the server load.

Perhaps I write a fix a little later.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

My bad, it does a cleanup in the get function