Automatic API caching for Rails