# How To Upgrade From 0.8.x to 0.9.x

Cloak `0.9.0` encrypts and decrypts data up to 200% faster than `0.8.0`.
This result is achieved by caching configuration data in an ETS table.

- **Breaking Change**: You must now add your `Cloak.Vault` to your
  supervision tree.

## Update Your Dependency

Update your `cloak` dependency to `0.9.0` or higher:

```elixir
{:cloak, "~> 0.9.0"}
```

### Supervise Your Vault

Add your vault to your supervision tree:

    children = [
      MyApp.Vault
    ]
# How To Upgrade From 0.8.x to 0.9.x

Cloak `0.9.0` encrypts and decrypts data up to 200% faster than `0.8.0`.
This result is achieved by caching configuration data in an ETS table.

- **Breaking Change**: You must now add your `Cloak.Vault` to your
  supervision tree.

## Update Your Dependency

Update your `cloak` dependency to `0.9.0` or higher:

```elixir
{:cloak, "~> 0.9.0"}
```

### Supervise Your Vault

Add your vault to your supervision tree:

    children = [
      MyApp.Vault
    ]

### Update `init/1` callback implementation

If you are fetching the keys from system vars, you should change the implementation of the `Cloak.Vault.init/1` callback to `GenServer.init/1`

```elixir
defmodule MyApp.Vault do
  use Cloak.Vault, otp_app: :my_app

  @impl GenServer
  def init(config) do
    (...)
  end
end
```

Add callback update to upgrading
Add callback update to upgrading
