Improve Search.Database.MySQL performance
Imported from https://youtrack.roxen.com/issue/PIKE-53
Reported by Martin Karlgren email@example.com
get_uri_id make SQL queries for each lookup, and it should be possible to cache that in memory. Negative caching is needed too. Cache entries need to be invalidated appropriately when any
remove* method is called.
Also add a method that accepts an
array(string) of URI:s to populate the two caches for, which should then read entries batch-wise from the database.
The purpose of these improvements is primarily to improve batch performance, i.e. re-indexing.