How to have key value mapping and caching in edge microgateway

ar2
Observer

I have a proxy in edge and I would like to create the same in edgemicro. For that I would need to know how to implement a plugin for key value maps and caching in edgemicro. Please let me know if there is a solution for the same.

0 1 271
1 REPLY 1

Writing a plugin in edgemicro is pretty simple.

You could manage the cache, and maybe even a key/value map in your own nodejs code. It's probably a poor idea to have the plugin "call out" to the Edge cloud instance. Instead just manage your own implementations of those things, functional equivalents, implemented in nodejs code.

For example, here's an in-memory cache with TTL for JavaScript (nodejs) https://www.npmjs.com/package/ttl .

You might consider combining the KVM and Cache functions into one, if you're implementing it anew in edgemicro.