Use a macro to get a pointer to the cache object (fixes #7)