Open wildhart opened 4 years ago
FYI, I've written a meteor package wildhart:env-var-set which adds the EnviromentVariable.set()
method so feel free to re-use that if you want.
I've used it within wildhart:mergebox-cache which is my own fork of userCache
which works with all collections, not just Meteor.users
.
If quickly doing a
findOne(field)
after anupdate()
then stale data is received. Contrived example:This is a contrived example for demonstration purposes, but I have hit this bug in real production code.
My work-around involves a bit of a hack of
Meteor.EnvironmentVariable
to set an environment variable within the Fiber whenever theMeteor.users
collection is updated: