Cache the result of User::getDefaultOptions(), so the UserGetDefaultOptions hook...
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 1 Nov 2011 15:55:57 +0000 (15:55 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 1 Nov 2011 15:55:57 +0000 (15:55 +0000)
commit42a360b069a84330e8a31c5800fd53f5d9fc04f6
treed599ce71585dc3c0c1ff9024108d5a7368882a48
parent41e944bac2f3d11caa3105499fc9bbbb8966a3a7
Cache the result of User::getDefaultOptions(), so the UserGetDefaultOptions hook (introduced in r97365) is run only once rather than on every call. Discovered this issue after seeing an insane number of memcached fetches in my RL2 code, caused by a UserGetDefaultOptions hook accessing the Gadgets storage backend (which has a memc layer) and being called a zillion times due to this bug.
includes/User.php