Skip to content

Commit

Permalink
Merge pull request #70 from rubemz/add-decentralized-counters-ets-option
Browse files Browse the repository at this point in the history
Supports decentralized_counters ets option
  • Loading branch information
sasa1977 authored Oct 3, 2023
2 parents afa00ee + 9fef22d commit a656fee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ ConCache.start_link(ets_options: [
:ordered_set,
{:read_concurrency, true},
{:write_concurrency, true},
{:decentralized_counters, true},
{:heir, heir_pid}
])
```
Expand Down
2 changes: 2 additions & 0 deletions lib/con_cache.ex
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ defmodule ConCache do
| {:heir, pid}
| {:write_concurrency, boolean}
| {:read_concurrency, boolean}
| {:decentralized_counters, boolean}
| :ordered_set
| :set
| :bag
Expand Down Expand Up @@ -122,6 +123,7 @@ defmodule ConCache do
- `:heir`
- `:write_concurrency`
- `:read_concurrency`
- `:decentralized_counters`
## Child specification
Expand Down
1 change: 1 addition & 0 deletions lib/con_cache/owner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ defmodule ConCache.Owner do
{:heir, _} = opt, acc -> append_option(acc, opt)
{:write_concurrency, _} = opt, acc -> append_option(acc, opt)
{:read_concurrency, _} = opt, acc -> append_option(acc, opt)
{:decentralized_counters, _} = opt, acc -> append_option(acc, opt)
:ordered_set, acc -> %{acc | type: :ordered_set}
:set, acc -> %{acc | type: :set}
:bag, acc -> %{acc | type: :bag}
Expand Down

0 comments on commit a656fee

Please sign in to comment.