cache of CdFriend not cleared
Closed this issue · 31 comments
When someone changes his email all bouts sends notifications to his old email until the cache of CdFriend will be expired(up to 5 hours). It looks like a bug for me.
If the email changed for an alias the CdFriend's cache also should be cleared
There is failed netbout-client test as well
Failed tests:
RtAliasITCase.updateAndRetrieveEmail:62
Expected: is "alias317800815@example.com"
but: was "alias1144935927@example.com"
@karato it's a valid bug
@dmzaytsev tag "bug" added
@dmzaytsev milestone set to 3.1
(correct me if I am wrong)
@dmzaytsev thanks for tis bug, I topped your account for 15 mins, transaction 60849495
@dimonn12 this task is yours, please help (see our key principles of work). If you have any technical questions, don't hesitate to ask right here
The cost of this task is 30 mins (this is exactly how much will be paid, not less not more), when the task is done
@karato this is postponed
@dmzaytsev got it, "postponed" label here
@karato this is postponed
@dmzaytsev I will try to find someone else
@karato this is not postponed anymore
@dmzaytsev OK, I un-labeled it as "postponed" tag
@karato this is urgent
@dmzaytsev sure, thanks, I added "urgent" label to it
@dimonn12 you've been working with this task for too long. I'm sorry, but I'll assign someone else. Please stop working with it. See our no obligations principle. added -60 to your rating, now it is equal to -240
@dmzaytsev how can I refer from CdAlias
to CdFriend
? They do not have any reference to each other. Moreover, I don't see any possibility to clear cache from outside of the class.
@dmzaytsev ping
@mkordas I believe we shouldn't use jcabi Cacheable in this case, because each alias contains own cache of its friends now. So an alias can clear only own cache. thus we need to use a shared cache instead.
Let's introduce a new class, say named SharedCache in com.netbout.cached
This class should contains a map of google guava cache instances, names(parameters) of instances will be passed in a constructor(or maybe in #add() method). SharedCache will be created in com.netbout.Launch#main() and passed as constructor parameter to CdBase and then to all Cd-classes when needed. So we need this class at least in CdAlias and CdFriends.
I would suggest to start from the implementation of SharedCache and unit tests and create a puzzles for other job
names(parameters) of instances will be passed in a constructor(or maybe in #add() method)
@dmzaytsev are you sure about the above? Do we really need map of caches? I think we just need one shared cache right now.
@dmzaytsev how would you like to achieve type-safety in such shared cache? Each cache may contain mappings between different things.
@dmzaytsev ping
@karato this is postponed
@dmzaytsev thanks, I added "postponed" label
@karato this is postponed
@dmzaytsev right, I removed "urgent" tags
@karato this is postponed
@dmzaytsev I will ask somebody else to pick this up