goview icon indicating copy to clipboard operation
goview copied to clipboard

How Can I Manual clear page cache?

Open wzhsh90 opened this issue 5 years ago • 3 comments

1、my page was dynanic changed , I need to clear tplMap cache. Is there a good way for me to solve this problem?

wzhsh90 avatar Oct 23 '20 07:10 wzhsh90

Config set DisableCache: true

gv := goview.New(goview.Config{
       //...
        DisableCache: true,
    })

foolin avatar Oct 23 '20 07:10 foolin

This config is not I wanted,If I set DisableCache:true , all page cache is invalid.

if !ok || e.config.DisableCache { tplList := make([]string, 0) if useMaster { //render() if e.config.Master != "" { tplList = append(tplList, e.config.Master) } }I just want to refresh one page.

------------------ 原始邮件 ------------------ 发件人: "foolin/goview" <[email protected]>; 发送时间: 2020年10月23日(星期五) 下午3:57 收件人: "foolin/goview"<[email protected]>; 抄送: "@"小万"^^$"<[email protected]>;"Author"<[email protected]>; 主题: Re: [foolin/goview] How Can I Manual clear page cache? (#19)

Config set DisableCache: true gv := goview.New(goview.Config{ //... DisableCache: true, })

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

wzhsh90 avatar Oct 23 '20 08:10 wzhsh90

can you support one interface to remove cache template ?

use this interface I can dynamic reload one page even if i use DisableCache: false

waiting for your good ideas.

wzhsh90 avatar Mar 16 '21 08:03 wzhsh90