Merge pull request #51 from VirtueMe/master

Added guard to cache handler so it doesn't loop forever