phpbb/phpbb3 — pull request #1156 by p (2012-12-20 09:39:42+00:00)
Title: [ticket/11037] Eliminate global $db usage in cache drivers.

The only time $db is needed in cache drivers is to navigate the
result set in sql_save. Pass it as a parameter in that function.

http://tracker.phpbb.com/browse/PHPBB3-11037

This is an alternative implementation to part of what #934 attempts that does not have any drawbacks/issues I can think of.