Skip to content

mikan-sour/go-listen-notify-cache-writethrough

Repository files navigation

Using Postgres Listen & Notify for Cache Writethrough

Utilizing Postgres native pub/sub features

Write to the cache with the DB and a listener instead of your API, improving latency for your client

To run

  1. set up your env

make env

  1. run the containers for Postgres and Redis

make up

  1. run the app

make run

  1. do an insert

make one

The above command will insert a record into the Postgres DB and print the value of the key set in the cache You can also open a postgres client and insert yourself.

Tests

Unit

make test

Integration

make e2e

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published