does anyone knows how to perform cache invalidation in apollo
?
I'm setting cache hints in resolvers:
export default (root, args, { userId }, { cacheControl }) => {
cacheControl.setCacheHint({ maxAge: 60 });
return userId && Meteor.users.findOne(userId);
};
But if something is changes and maxAge
is big enough changes would not be reflected.
I'm now thinking about calling cacheControl.setCacheHint({ maxAge: 0 })
in mutations, are there any other ways of doing this?