API Design that Caches an External API
===

I have built a lightweight Ruby code to wrap an external API:

    api = ExternalAPI.new
    api.expensive_operation(object)

It works fine. However, since the API is expensive, I don't want to call it unless necessary. This is why I am creating a higher-level API that wraps the API call with local caching. I don't want the application to have to worry about the details about how the API is cached. (Caching could be accomplished by memory, disk, [abaci](http://en.wikipedia.org/wiki/Abacus), even [pigeons](http://en.wikipedia.org/wiki/IP_over_Avian_Carriers) -- it is not the application's concern.)

Here is what I am currently considering:

<pre>
wrapper = ExternalAPIWrapper.new
wrapper.expensive_operation(object)
</pre>

I don't like about the name `ExternalAPIWrapper`. It is generic, does not convey the **purpose** of the wrapper. In particular, it does not indicate that it is checks a local cache first and only hits the low-level API if necessary.

I'm looking for answers that improve upon this starting point. Here are some things I'm looking for:

1. A better name for the high-level class
2. A better style API
3. Design pattern(s) that might help
4. (Perhaps a longshot...) a Ruby gem that wraps and caches API calls
