Files
Blackoutta b86f12fbaa Add Redis caching to FetchPluginInstallation middleware for performance optimization (#400)
* add caching to fetch plugin installation middleware

* invalidate plugin inst cache after successfully upgrading or uninstalling operations

* optimize: refactored cache invalidation ops from curd layer to service layer

---------

Co-authored-by: yangyi.hu593671 <yangyi.hu593671@seres.cn>
2025-08-27 14:16:52 +08:00

25 lines
333 B
Go

package helper
import "strings"
func PluginInstallationCacheKey(pluginId, tenantId string) string {
return strings.Join(
[]string{
"plugin_id",
pluginId,
"tenant_id",
tenantId,
},
":",
)
}
func EndpointCacheKey(hookId string) string {
return strings.Join(
[]string{
"hook_id",
hookId,
},
":",
)
}