Support cache systems that use read/write instead of get/set or []/[]=

Hi,

Ran into a case where the cache used function read/write instead of get/set (ActiveSupport::Cache::Store), so caching didn't actually happen.

This changes cache.rb to check for those functions as well.