How to test Grapher Caching


I’ve followed the Grapher caching guide but I’m struggling to test it.

I thought MontiAPM might be able to show me based on whether the Method count increased, but the Method would still be called, regardless of caching.

I can’t see anything in the Meteor Dev Tools that looks like it could help. The only Grapher related thing in there is ‘grapher_counts’ in Minimongo, but I can’t find any documentation that.

Console logging the cache object gives this:

// object being logged
const cacher = new MemoryResultCacher({ ttl: 60 * 1000 });

// log output:
// MemoryResultCacher { config: { ttl: 60000 }, store: {} }

I’m not sure if the store object property is relevant?

I don’t get any errors, but I’d like to confirm that I’ve implemented it correctly before applying this across my entire codebase.