Closed Cikey closed 1 month ago
Hi @Cikey!
Yes, the change to Cachex.fetch/4
was intentional, I just missed out on updating the documentation I guess.
You're right, that's bad wording (Cachex.load/3
was changed to that same format before it was removed), so I'll update that section too.
I changed these in https://github.com/whitfin/cachex/commit/b1c6cf8615552a3da1cbf9bbf594b3468aa4080d - let me know if that looks good to you!
Looks great! Thanks for the quick fixes!
Hi there,
we just updated to Cachex 4.0.2 and had some observations when applying the migration guide:
Cachex.fetch
seems to omit the optionalexpire
setting in the call result. This is not documented and is also wrongly shown in the function documentation: https://hexdocs.pm/cachex/Cachex.html#fetch/4 (last code example). Tests were updated in https://github.com/whitfin/cachex/commit/b976fb3d1be2228acc61fb7fd2e8c0a635ca5c51 so i guess its intentional? The function docs also still call itttl
.Cachex.restore
is described aswhich behave in exactly the same way
in the migration guide, but the return value changed from{:ok, true}
to{:ok, number_of_keys}
. I guess the method signature did not change from{status(), any()}
but it was still a problem for our more conservative pattern match which included thetrue
value.