From add6cccb68d0e70d87c6bcbcf909f53888b4e790 Mon Sep 17 00:00:00 2001 From: mindok Date: Tue, 1 Oct 2024 17:21:35 +1000 Subject: [PATCH] Update migration doc to include hook option name change --- docs/migrations/migrating-to-v4.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/migrations/migrating-to-v4.md b/docs/migrations/migrating-to-v4.md index 0e18fd1..1c8f70c 100644 --- a/docs/migrations/migrating-to-v4.md +++ b/docs/migrations/migrating-to-v4.md @@ -39,6 +39,8 @@ Cachex.start_link(:my_cache, [ Both of these features have had additional documentation written, so you can double check the relevant documentation in [Gathering Stats](../management/stats-gathering.md) and [Limiting Caches](../management/limiting-caches.md) as necessary. Limits in particular have had quite a shakeup in Cachex v4, so it's definitely worth a visit to the documentation if you're using those! +In addition, the `:state` option when registering a hook has been renamed `:args` as per the example above. + The `:nodes` option has also been removed, in favour of the new approach to routing in a distributed cache. It's possible to keep the same semantics as Cachex v3 using the `Cachex.Router.Jump` module implementation: ```elixir @@ -114,4 +116,4 @@ The minimum supported Elixir version has been raised from Elixir 1.5 to Elixir 1 A lot of the record types in Cachex v4 had their orders changed, so if anyone was matching directly (instead of using record syntax) they should adapt to using `entry(entry, :field)` instead. -The former `ExecutionError` has been replaced with `Cachex.Error`, which is a combination of several smaller modules. This is just a naming difference to hopefully make it easier to type and rememeber! +The former `ExecutionError` has been replaced with `Cachex.Error`, which is a combination of several smaller modules. This is just a naming difference to hopefully make it easier to type and remember!