Wrote tests for controller and implemented caching