During the review of PULL-431, Eloy detected some references to $CFG->dataroot.'/cache/languages'. This used to be a file holding the list of all installed languages (if $CFG->langcache was enabled) and was used by get_list_of_languages(). This function was then refactored to a method of the string manager get_list_of_translations(). The new method does not use any caching yet, there is a todo for it.
Also, it seems that the path moodledata/cache/languages is used as a directory at several places. That was my mistake at a9e41d and needs fixing.