forkcms/forkcms — pull request #935 by WouterSioen (2014-11-05 08:43:53+00:00)
Title: Refactoring

Refactorings to the cache building process for navigation and locale.

* Extract classbuilding to external classes
* Use dependency injection to inject the container in the CacheBuilders
* Split up massive methods in smaller (even testable) functions.

What could still be done

* Extract a base CacheBuilder class (it could contain the getCacheHeader method and some common functionality with the fileSystem component)
* Add automatic tests
* Refactor to make sure the cache builder doesn't do database queries.

But it's already a big improvement in the complexity of these methods. (And it removes some duplicate code between front and backend)