Skip to content

Commit

Permalink
Update overview inline with README
Browse files Browse the repository at this point in the history
  • Loading branch information
whitfin committed Sep 24, 2024
1 parent c716330 commit a811ad6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ children = [

Both of these approaches work the same way; your options are parsed and your cache is started as a child under the appropriate parent process. The latter is recommended for production applications, as it will ensure your cache is managed correctly inside your application.

## Basic Operations
## Basic Examples

Working with a cache is pretty straightforward, and basically everything is provided by the core `Cachex` module. You can make calls to a cache using the name you registered it under at startup time.

Expand Down Expand Up @@ -88,13 +88,13 @@ nil = Cachex.get!(:my_cache, "key")

# but calling with `!` raises the error
Cachex.get!(:missing_cache, "key")
** (Cachex.ExecutionError) Specified cache not running
** (Cachex.Error) Specified cache not running
(cachex) lib/cachex.ex:249: Cachex.get!/3
```

The `!` version of functions exists for convenience, in particular to make chaining and assertions easier in unit testing. For production use cases it's recommended to avoid `!` wrappers, and instead explicitly handle the different response types.

## Advanced Operations
## Advanced Examples

Beyond the typical get/set semantics of a cache, Cachex offers many additional features to help with typical use cases and access patterns a developer may meeting during their day-to-day.

Expand Down

0 comments on commit a811ad6

Please sign in to comment.