added resource route generation and caching

So I went ahead and re-added resource route support - this time as per issue #194. When you have time, please take a look, and let me know what you think.