Dump cached results on a change

3.0-unstable version of #2399
Pass $params to 'select' hook

3.0-unstable version of #2448