adds cache_key support for rails

Adds the cache_key method to support Rails 4 fragment caching plus specs.