Wikia/app — pull request #1019 by garthwebb (2013-06-24 17:26:43+00:00)
Title: Altered the query to make it a bit faster.  Also, caching recommendations.

* Using subselect in query to avoid doing an outer join against every row in the video_info table
* Caching the recommendation we get from search. Also saving the unixtime of the suggestions so we can invalidate them if we want
* Avoid making tens of 'table exists' queries on the video_info table by caching the result of that query.