[PR #128] [MERGED] add cache for endpoint by hook_id and pluginInstallation by plugin_id&tenant_id #327

Closed
opened 2026-02-16 01:15:34 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/128
Author: @zxfishhack
Created: 3/20/2025
Status: Merged
Merged: 4/6/2025
Merged by: @Yeuoly

Base: mainHead: cache-endpoint-and-plugin-install


📝 Commits (6)

  • 1e5e03e add cache for endpoint by hook_id and plugin by plugin_id&tenant_id
  • 7cfc991 Merge branch 'main' into cache-endpoint-and-plugin-install
  • 3aa0490 use AutoTypeWithGetter
  • 3c71ddd remove debug log
  • 4aa61bc remove debug log
  • 9996714 Merge branch 'main' into cache-endpoint-and-plugin-install

📊 Changes

3 files changed (+69 additions, -6 deletions)

View changed files

📝 internal/server/endpoint.go (+35 -6)
📝 internal/service/install_service/state.go (+20 -0)
📝 internal/types/models/curd/atomic.go (+14 -0)

📄 Description

Add cache for endpoint and pluginInstallation to reduce database query in App.EndpointHandler.

Closed #124

Note: The modifications of this PR are relatively scattered, and the invalidation of cache is scattered in the disabling and deletion of Endpoint, uninstallation of plugins, etc. If there is a plan to maintain the cache in a unified manner, I will wait for it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/128 **Author:** [@zxfishhack](https://github.com/zxfishhack) **Created:** 3/20/2025 **Status:** ✅ Merged **Merged:** 4/6/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `cache-endpoint-and-plugin-install` --- ### 📝 Commits (6) - [`1e5e03e`](https://github.com/langgenius/dify-plugin-daemon/commit/1e5e03eaf00619935c9abed92f08ba31f204287c) add cache for endpoint by hook_id and plugin by plugin_id&tenant_id - [`7cfc991`](https://github.com/langgenius/dify-plugin-daemon/commit/7cfc991db370101979df62ed32544d60648b49e1) Merge branch 'main' into cache-endpoint-and-plugin-install - [`3aa0490`](https://github.com/langgenius/dify-plugin-daemon/commit/3aa04902940e521eebddd1150bbc35bd9bd84cdf) use AutoTypeWithGetter - [`3c71ddd`](https://github.com/langgenius/dify-plugin-daemon/commit/3c71ddd4af59530cdf33a90c28af9665af8d0db1) remove debug log - [`4aa61bc`](https://github.com/langgenius/dify-plugin-daemon/commit/4aa61bc9bc8cef484905a58b33339a6f45df6717) remove debug log - [`9996714`](https://github.com/langgenius/dify-plugin-daemon/commit/9996714f2d0c9d1f2687a26b9428698089ac8741) Merge branch 'main' into cache-endpoint-and-plugin-install ### 📊 Changes **3 files changed** (+69 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `internal/server/endpoint.go` (+35 -6) 📝 `internal/service/install_service/state.go` (+20 -0) 📝 `internal/types/models/curd/atomic.go` (+14 -0) </details> ### 📄 Description Add cache for endpoint and pluginInstallation to reduce database query in App.EndpointHandler. Closed #124 **Note**: The modifications of this PR are relatively scattered, and the invalidation of cache is scattered in the disabling and deletion of Endpoint, uninstallation of plugins, etc. If there is a plan to maintain the cache in a unified manner, I will wait for it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:15:34 -05:00
yindo closed this issue 2026-02-16 01:15:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#327