mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-24 02:35:26 -04:00
b86f12fbaa
* 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>
25 lines
333 B
Go
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,
|
|
},
|
|
":",
|
|
)
|
|
} |