I'm following the CacheAPI example.  I don't really like the name either, but it's mostly there for the plugin.