MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / RemoveServerCache

Method RemoveServerCache

agent/utils/nginx/components/location.go:323–331  ·  view source on GitHub ↗
(cacheKey string)

Source from the content-addressed store, hash-verified

321}
322
323func (l *Location) RemoveServerCache(cacheKey string) {
324 l.RemoveDirective("proxy_ignore_headers", []string{"Set-Cookie", "Cache-Control", "expires"})
325 l.RemoveDirective("proxy_cache", []string{cacheKey})
326 l.RemoveDirective("proxy_cache_key", []string{"$host$uri$is_args$args"})
327 l.RemoveDirective("proxy_cache_valid", []string{"200"})
328 l.Cache = false
329 l.ServerCacheTime = 0
330 l.ServerCacheUint = ""
331}
332
333func (l *Location) AddSubFilter(subFilters map[string]string) {
334 l.RemoveDirective("sub_filter", []string{})

Callers 1

OperateProxyMethod · 0.95

Calls 1

RemoveDirectiveMethod · 0.95

Tested by

no test coverage detected