Skip to content

Commit a06da33

Browse files
committed
Improve docs
1 parent 01526df commit a06da33

File tree

9 files changed

+54
-33
lines changed

9 files changed

+54
-33
lines changed

CHANGELOG.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Changelog
22

3-
## [v3.0.0-rc.1](https://github.com/elixir-nebulex/nebulex_distributed/tree/v3.0.0-rc.1) (2025-05-11)
4-
5-
[Full Changelog](https://github.com/elixir-nebulex/nebulex_distributed/compare/2c6188ebb9a482cd75a97b6abdb2feddcfb189c9...v3.0.0-rc.1)
3+
## [v3.0.0-rc.1](https://github.com/elixir-nebulex/nebulex_distributed/tree/v3.0.0-rc.1) (2025-06-07)
4+
> [Full Changelog](https://github.com/elixir-nebulex/nebulex_distributed/compare/2c6188ebb9a482cd75a97b6abdb2feddcfb189c9...v3.0.0-rc.1)
65
76
### Enhancements
87

@@ -19,6 +18,9 @@
1918

2019
### Backwards incompatible changes
2120

21+
- [Nebulex.Distributed] `Nebulex.Distributed` requires Erlang/OTP 25 or later.
22+
- [Nebulex.Distributed.RPC] The usage of async tasks for the RPC calls has been
23+
removed (for OTP < 23). The new `Nebulex.Distributed.RPC` module uses `:erpc`.
2224
- [Nebulex.Adapters.Multilevel] Option `:model` is no longer supported. Please
2325
use the option `:inclusion_policy` instead.
2426
- [Nebulex.Adapters.Multilevel] The previous extended function `model/0,1` has
@@ -28,8 +30,6 @@
2830
adapter uses `ExHashRing` for key distribution under-the-hood.
2931
- [Nebulex.Adapters.Partitioned] The option `:join_timeout` is no longer
3032
supported.
31-
- [Nebulex.Distributed.RPC] The usage of async tasks for the RPC calls has been
32-
removed (for OTP < 23). The new `Nebulex.Distributed.RPC` module uses `:erpc`.
3333

3434
### Closed issues
3535

@@ -39,6 +39,3 @@
3939
[#2](https://github.com/elixir-nebulex/nebulex_distributed/issues/2)
4040
- Upgrade to Nebulex v3.0.0
4141
[#1](https://github.com/elixir-nebulex/nebulex_distributed/issues/1)
42-
43-
44-
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ cache topologies, but this feature will depend on the adapters. Here is where
1515
**"Nebulex Distributed"** comes in. It provides the following adapters to set up
1616
distributed topologies:
1717

18-
* `Nebulex.Adapters.Multilevel` - Multi-level distributed cache topology.
1918
* `Nebulex.Adapters.Partitioned` - Partitioned cache topology.
19+
* `Nebulex.Adapters.Multilevel` - Multi-level distributed cache topology.
2020
* `Nebulex.Adapters.Replicated` - Replicated cache topology (**WIP!**).
2121

2222
These adapters work more as wrappers for an existing local adapter and provide
@@ -36,6 +36,10 @@ def deps do
3636
end
3737
```
3838

39+
See the [online documentation][online_docs] for more information.
40+
41+
[online_docs]: http://hexdocs.pm/nebulex_distributed
42+
3943
## Partitioned cache topology example
4044

4145
You can define a partitioned cache as follows:
@@ -136,10 +140,6 @@ def start(_type, _args) do
136140
]
137141
```
138142

139-
See the [online documentation][online_docs] for more information.
140-
141-
[online_docs]: http://hexdocs.pm/nebulex_distributed
142-
143143
## Testing
144144

145145
Since this adapter uses support modules and shared tests from `Nebulex`,

lib/nebulex/adapters/multilevel.ex

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,19 @@ defmodule Nebulex.Adapters.Multilevel do
229229
]
230230
}
231231
232-
## Caveats of multi-level adapter
232+
## Extended API
233+
234+
This adapter provides some additional convenience functions to the
235+
`Nebulex.Cache` API.
236+
237+
### `inclusion_policy/0,1`
238+
239+
Returns the inclusion policy of the cache.
240+
241+
iex> MyCache.inclusion_policy()
242+
:inclusive
243+
244+
## CAVEATS
233245
234246
Because this adapter reuses other existing/configured adapters, it inherits
235247
all their limitations too. Therefore, it is highly recommended to check the

lib/nebulex/adapters/multilevel/options.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
defmodule Nebulex.Adapters.Multilevel.Options do
2-
@moduledoc """
3-
Option definitions for the multi-level adapter.
4-
"""
2+
@moduledoc false
53

64
# Start options
75
start_opts = [

lib/nebulex/adapters/partitioned.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ defmodule Nebulex.Adapters.Partitioned do
308308
309309
MyCache.leave_cluster()
310310
311-
## Caveats of partitioned adapter
311+
## CAVEATS
312312
313313
For `c:Nebulex.Cache.get_and_update/3` and `c:Nebulex.Cache.update/4`,
314314
they both have a parameter that is the anonymous function, and it is compiled

lib/nebulex/adapters/partitioned/options.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
defmodule Nebulex.Adapters.Partitioned.Options do
2-
@moduledoc """
3-
Option definitions for the partitioned adapter.
4-
"""
2+
@moduledoc false
53

64
# Compilation time options
75
compile_opts = [
@@ -31,8 +29,10 @@ defmodule Nebulex.Adapters.Partitioned.Options do
3129
required: false,
3230
default: [],
3331
doc: """
34-
Options for the hash ring. See `ExHashRing.Ring.start_link/2` for more
35-
information.
32+
Options for the hash ring.
33+
See [`ExHashRing.Ring.start_link/2`][ex_hash_ring] for more information.
34+
35+
[ex_hash_ring]: https://hexdocs.pm/ex_hash_ring/ExHashRing.Ring.html#start_link/1
3636
"""
3737
]
3838
]

lib/nebulex/distributed/cluster.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Nebulex.Distributed.Cluster do
2-
# The module used by cache adapters for
3-
# distributed caching functionality.
4-
@moduledoc false
2+
@moduledoc """
3+
This module is used by cache adapters for distributed caching functionality.
4+
"""
55

66
import Nebulex.Utils, only: [wrap_error: 2]
77

lib/nebulex/distributed/helpers.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
defmodule Nebulex.Distributed.Helpers do
2-
@moduledoc """
3-
General purpose helper functions.
4-
"""
2+
@moduledoc false
53

64
## API
75

mix.exs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,26 @@ defmodule NebulexDistributed.MixProject do
3434
description: "A generational local cache adapter for Nebulex",
3535

3636
# Docs
37-
docs: [
38-
main: "Nebulex.Distributed",
39-
source_ref: "v#{@version}",
40-
source_url: @source_url
37+
name: "Nebulex.Distributed",
38+
docs: docs()
39+
]
40+
end
41+
42+
defp docs do
43+
[
44+
main: "Nebulex.Distributed",
45+
source_ref: "v#{@version}",
46+
source_url: @source_url,
47+
canonical: "http://hexdocs.pm/nebulex_distributed",
48+
groups_for_modules: [
49+
Adapters: [
50+
Nebulex.Adapters.Multilevel,
51+
Nebulex.Adapters.Partitioned
52+
],
53+
Utilities: [
54+
Nebulex.Distributed.Cluster,
55+
Nebulex.Distributed.RPC
56+
]
4157
]
4258
]
4359
end

0 commit comments

Comments
 (0)