Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
imantung committed Nov 1, 2020
1 parent 1774da6 commit 028027b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Pragmatic Golang RESTful Server Implementation. The project using [typical-go](h
- Others
- [x] Database migration and seed tool
- [x] Generate code, `.env` file and `USAGE.md` according the configuration (using `@envconfig` annotation)
- [x] Code generator for repository layer (using `@entity` annotation)
- [x] Generate code for repository layer (using `@entity` annotation)
- [x] Releaser


## Run/Test Project
Expand Down Expand Up @@ -205,11 +206,14 @@ func (s *SvcImpl) SomeOperation(ctx context.Context) error{

## Server-Side Cache

Use middleware to handling cache
Use echo middleware to handling cache
```go
cacheStore := cachekit.Store{
Client: redis.NewClient(&redis.Options{Addr: "localhost:6379"})
cacheStore := &cachekit.Store{
Client: redis.NewClient(&redis.Options{Addr: "localhost:6379"}),
DefaultMaxAge: 30 * time.Second,
PrefixKey: "cache_",
}

e := echo.New()
e.GET("/", handle, cacheStore.Middleware)
```
Expand All @@ -227,13 +231,6 @@ RESTful API:
- [Best Practices for Designing a Pragmatic RESTful API](https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api)
- [Everything You Need to know About API Pagination](https://nordicapis.com/everything-you-need-to-know-about-api-pagination/)

## Project Starter

To setup new project, please use [rest-project-starter](https://github.com/typical-go/rest-project-starter)
```bash
curl -s https://raw.githubusercontent.com/typical-go/rest-project-starter/master/setup.sh | bash -s [project_name] [package_name]
```

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

0 comments on commit 028027b

Please sign in to comment.