1
所以我试图根据找到的cookie来设置我的高速缓存条件。我使用下面的代码,但功能不能正常工作,因为Cookie页面被缓存了24小时。任何人都可以看看,并让我知道下面的代码我的问题是什么?高速缓存条件不工作基于WordPress的饼干
if (req.http.Cookie ~"(wp-postpass|wordpress_logged_in|comment_author_)") {
set cacheable = false;#versions less than 3
beresp.ttl>0 is cacheable so 0 will not be cached
set beresp.ttl = 0s;
} else {
set beresp.cacheable = true;
set beresp.ttl=300s;#cache for 24hrs
}