Kong Proxy Cache plugin
1 min readNov 9, 2022
I launched a Kong plugin for caching a while ago. It is a custom plugin for Kong which provides a reverse cache implementation. It caches response entities based on the provided configurations. It does most things very similar to the kong official proxy cache plugin.
GitHub Link for this plugin: https://github.com/mountainfirefly/kong-proxy-redis-cache-tags-plugin
The main enhancements I made to it are mentioned below
- This plugin is written in javascript, (So javascript developers, this might serve as motivation for you to write kong plugins in Javascript rather than Lua)
- How to purge the cache entities before their expiration time
- Use of Redis to store the cached entities
There are two ways to purge/invalidate the cache entities before their expiration entities
- Invalidate records using invalidate cache endpoint.
- Invalidate using the
x-invalidate-cache-tags
header
To find out all the details about this plugin checked out my blog or Github.