Experiment model has a Bucket list as a value. So, Bucket list in Experiment is not updated even if cache TTL time passed.
When Bucket is changed in DB, SafeUpdateCache returns the old Bucket to initialize Experiment. So, Experiment is updated but Bucket is not. After 2*TTL time elapsed, Bucket list in Experiment is updated successfully.
Experiment
model has aBucket
list as a value. So,Bucket
list inExperiment
is not updated even if cache TTL time passed. WhenBucket
is changed in DB,SafeUpdateCache
returns the oldBucket
to initializeExperiment
. So,Experiment
is updated butBucket
is not. After 2*TTL time elapsed,Bucket
list inExperiment
is updated successfully.