turbot / steampipe-plugin-sdk

Steampipe Plugin SDK is a simple abstraction layer to write a Steampipe plugin. Plugins automatically work across all engine types including the Steampipe CLI, Postgres FDW, SQLite extension and the export CLI.

Home Page:https://hub.steampipe.io/plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update connection cache to use a backing store per connection, rather than a shared backing store

kaidaguerre opened this issue · comments

In pipes, we are seeing issues with high numbers of connecitons where the cached credentials are not always cleared from the cache.

Currently the connection cache uses a shared backing store for all connections, and the entries for a given connection tagged with the connection. go-cache allows deletion of all cache entries with a given tag which is how the conneciotn cache is cleared currently.

However it seems the tagging fails under certain circumstances, meaning the cache deletion sometimes does not work, resulting in expired credentials being kept in the cache.

So, instead, use a cache store per connection and just clear the whole cache when clearing for a connection