Fix for cache_options issue

Not sure if it's just in Rails 4, but the cache_options key is no longer available under @options, but instead @locals, so I've modified the code to check both.

Initially raised in issue #22