Skip to content

benbpyle/momento-go-sample

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Momento Golang Sample

A simple repository that supports this Article. It highlights how to set up the Momento client and use it in a Golang Lambda Function.

Up and Running

cdk deploy
# watch
cdk watch # this just is a nice little nugget

Then create the record route record

DDB Record

Lastly, let's run the Lambda with this event payload

{
    "name": "sample",
    "correlationId": "abc"
}

Once you've done all of that, you'll get some output that looks like this.

First, run, you'll set the cache as a miss, the DDB is queried and then set.

Hit Miss

Run it a second time, and you'll see the cache hit

Output

About

Sample Go repos to show using Cache

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published