Dog_matches_controller refactored to:

* remove duplicated code and simplify conditional expression
* by moving repeated logic out of the conditional
Removed disk-based caching
Merge pull request #3 from devindreszer/refactoring

Refactoring