mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 23:30:26 +08:00
实现缓存策略若干功能
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/nodeutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/messageconfigs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type TestReadAction struct {
|
||||
@@ -16,6 +18,12 @@ func (this *TestReadAction) RunPost(params struct {
|
||||
CachePolicyId int64
|
||||
Key string
|
||||
}) {
|
||||
// 记录clusterId
|
||||
this.AddCookie(&http.Cookie{
|
||||
Name: "cache_cluster_id",
|
||||
Value: strconv.FormatInt(params.ClusterId, 10),
|
||||
})
|
||||
|
||||
cachePolicyResp, err := this.RPC().HTTPCachePolicyRPC().FindEnabledHTTPCachePolicyConfig(this.AdminContext(), &pb.FindEnabledHTTPCachePolicyConfigRequest{CachePolicyId: params.CachePolicyId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
Reference in New Issue
Block a user