Skip to content

Commit

Permalink
Various updates for version 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Kilkelly committed Oct 12, 2018
1 parent d937a25 commit 67703de
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 2 additions & 4 deletions README.md
Expand Up @@ -23,7 +23,7 @@ by adding `hammer` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[{:hammer, "~> 5.0"}]
[{:hammer, "~> 6.0"}]
end
```

Expand Down Expand Up @@ -66,9 +66,7 @@ Backends are configured via `Mix.Config`:
```elixir
config :hammer,
backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4,
cleanup_interval_ms: 60_000 * 10,
pool_size: 2,
pool_max_overflow: 4]}
cleanup_interval_ms: 60_000 * 10]}
```


Expand Down
2 changes: 1 addition & 1 deletion doc_src/Tutorial.md
Expand Up @@ -7,7 +7,7 @@ Add Hammer as a dependency in `mix.exs`:

```elixir
def deps do
[{:hammer, "~> 5.0"}]
[{:hammer, "~> 6.0"}]
end
```

Expand Down
10 changes: 6 additions & 4 deletions lib/hammer/application.ex
Expand Up @@ -14,11 +14,13 @@ defmodule Hammer.Application do
options, and with the same effect:
- `:expiry_ms` (int): expiry time in milliseconds, after which a bucket will
be deleted. The exact mechanism for cleanup will vary by backend
- `:pool_size` (int): size of the backend worker pool
be deleted. The exact mechanism for cleanup will vary by backend. This configuration
option is mandatory
- `:pool_size` (int): size of the backend worker pool (default=2)
- `:pool_max_overflow` int(): number of extra workers the pool is permitted
to spawn when under pressure. The worker pool (managed by the poolboy library)
will automatically create and destroy workers up to the max-overflow limit
(default=0)
Example of a single backend:
Expand All @@ -35,14 +37,14 @@ defmodule Hammer.Application do
ets_table_name: :hammer_backend_ets_buckets,
expiry_ms: 60_000 * 60 * 2,
cleanup_interval_ms: 60_000 * 2,
pool_size: 2,
]
},
redis: {
Hammer.Backend.Redis,
[
expiry_ms: 60_000 * 60 * 2,
redix_config: [host: "localhost", port: 6379]
redix_config: [host: "localhost", port: 6379],
pool_size: 4,
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Expand Up @@ -13,7 +13,7 @@ defmodule Hammer.Mixfile do
],
source_url: "https://github.com/ExHammer/hammer",
homepage_url: "https://github.com/ExHammer/hammer",
version: "6.0.0-rc1",
version: "6.0.0",
elixir: "~> 1.6",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
Expand Down

0 comments on commit 67703de

Please sign in to comment.