|
6 | 6 | [](https://codecov.io/gh/prashanthpai/sqlcache) |
7 | 7 | [](https://opensource.org/licenses/MIT) |
8 | 8 |
|
9 | | -sqlcache is an **experimental** caching middleware for `database/sql`. It |
10 | | -leverages APIs provided by the handy [sqlmw](https://github.com/ngrok/sqlmw) |
| 9 | +sqlcache is an **experimental** caching middleware for `database/sql` |
| 10 | +that enables existing Go programs to add caching in a declarative way. |
| 11 | +It leverages APIs provided by the handy [sqlmw](https://github.com/ngrok/sqlmw) |
11 | 12 | project and is inspired from [slonik-interceptor-query-cache](https://github.com/gajus/slonik-interceptor-query-cache). |
| 13 | + |
12 | 14 | This liberates your Go program from maintaining imperative code that |
13 | | -implements the cache-aside pattern. Your program will perceive the |
14 | | -database client/driver as a read-through cache. |
| 15 | +repeatedly implements the cache-aside pattern. Your program will perceive |
| 16 | +the database client/driver as a read-through cache. |
15 | 17 |
|
16 | | -Tested with PostgreSQL database with [pgx](https://github.com/jackc/pgx/tree/master/stdlib) as the driver. |
| 18 | +Tested with PostgreSQL database with [pgx](https://github.com/jackc/pgx/tree/master/stdlib) |
| 19 | +as the underlying driver. |
17 | 20 |
|
18 | 21 | Cache backends supported: |
19 | 22 |
|
@@ -77,11 +80,6 @@ rows, err := db.QueryContext(context.TODO(), ` |
77 | 80 |
|
78 | 81 | See [example/main.go](example/main.go) for a full working example. |
79 | 82 |
|
80 | | -## TODO |
81 | | -
|
82 | | -* Test against different postgres data types. |
83 | | -* Check if deep copy of buffers can be removed. |
84 | | -
|
85 | 83 | ### References |
86 | 84 |
|
87 | 85 | * A declarative way to cache PostgreSQL queries using Node.js: a [blog post](https://dev.to/gajus/a-declarative-way-to-cache-postgresql-queries-using-node-js-4fbo) by the author of [Slonik](https://github.com/gajus/slonik). |
|
0 commit comments