Skip to content

smbc-digital/invalidate-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

invalidate-redis

AWS Lambda function allowing removal of keys from Redis
Built with ❤︎ by Stockport Council and contributors

Table of Contents

Features

  • Easy invalidation: simple way to remove a value from Redis using the key

Prerequisites

A REDIS_URL environment variable has to be set, providing the url to your Redis store. The default Redis port (6379) is used.

Philosophy

We needed a simple, standalone solution to invalidate our Redis cache distributions.

Usage

Built to be used with AWS Lambda and API Gateway.

To manually send a request to trigger a invalidate request you need to supply a 'Header' value of key 'x-api-key' with the API Gateway key associated with the Enviroment you are targeting.

The API Gateway url is found at: APIs > invalidateRedis > Stages (The url will end with default/invalidaRedis{ENV})

The API Gateway API key is found at within AWS gateway.

Possible responses:

  • 200 OK: Successfuly deleted the key. Also returned when the key does not exist in the store.
  • 500 Internal Server Error: Error while carrying out the operation. Contains error property.

License

MIT

About

lambda to invalidate redis cache on AWS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •