Need a cache for APILocator.getLanguageAPI().getLanguages()
its called here and in other places.
This needs to be cached and dealt with properly with invalidations as languages are removed and added
https://github.com/dotCMS/core/blob/master-3.1/src/com/dotmarketing/velocity/VelocityServlet.java#L1230
the method is here https://github.com/dotCMS/core/blob/master-3.1/src/com/dotmarketing/portlets/languagesmanager/business/LanguageFactoryImpl.java#L152
so in addition to the commits above we need a unit test here.
@erickgonzalez as we discussed can you write a unit test shere put in cache remove etc...
Working as expected. Tested on: 3.1 Nightly build 2015-02-21 21:54 // Ubuntu 14.04 // MySQL // Firefox & Chrome