Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Use memory as default cache
Browse files Browse the repository at this point in the history
  • Loading branch information
rdumont committed Feb 12, 2019
1 parent 5de0135 commit f15d9df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Use the following environment variables to configure the server:
* `PORT` (default: `3000`) - Port on which the application will listen
* `BACKEND_URL` (*required*, ex: `http://your-repo.cdn.prismic.io`) - URL of your Prismic API backend
* `REDIS_URL` (default: `redis://localhost`) - Redis connection URL, if you choose to use Redis as a cache
* `CACHE_PROVIDER` (default: `redis`, values: `redis`, `memory`) - which cache provider implementation to use
* `CACHE_PROVIDER` (default: `memory`, values: `redis`, `memory`) - which cache provider implementation to use

### Running in Kubernetes

Expand All @@ -24,7 +24,6 @@ The [Docker image](https://hub.docker.com/r/escaletech/buran/tags) used in the K
```sh
$ docker run --name prismic \
--env BACKEND_URL='http://<your-repo>.cdn.prismic.io' \
--env CACHE_PROVIDER='memory' \
-p 3000:3000 escaletech/buran
```

Expand All @@ -41,9 +40,7 @@ $ docker run --name prismic \
After cloning the project, run:

```sh
$ BACKEND_URL='http://<your-repo>.cdn.prismic.io' \
CACHE_PROVIDER='memory' \
make
$ BACKEND_URL='http://<your-repo>.cdn.prismic.io' make
```

And you should see:
Expand Down
2 changes: 1 addition & 1 deletion env/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Config struct {
Port string `default:"3000"`
BackendURL string `required:"true" split_words:"true"`
RedisURL string `default:"redis://localhost" split_words:"true"`
CacheProvider string `default:"redis" split_words:"true"`
CacheProvider string `default:"memory" split_words:"true"`
}

func GetConfig() Config {
Expand Down

0 comments on commit f15d9df

Please sign in to comment.