I am building a mostly static site in meteor and i realize i wont need the realtime features a lot and to reduce the load on the server i will be getting the data using meteor methods.
But this will no longer trigger caching by minimongo(via SubsManager).
I just thought, why not use meteor method to get the data from the server and just continuously update the local mongo. The data wont be real time but it will cache the pages so if you transition to a recently visited page it will load instantly.
So something like:
Meteor.methods({
getPost(id) {
return Posts.findOne({ _id: id});
}
});
componentWillMount() {
Meteor.call('getPost', podcastId (err, res) => {
Posts_local.upsert(res);
});
}
getMeteorData() {
return {
post: Posts_local.findOne({ _id: postId });
}
}
Any down side of doing it like this?