6
我按下後退按鈕時清除緩存時出現問題。Symfony2響應 - 清除後退按鈕上的緩存標題
我的頭信息是說i'ts從緩存中加載:
Status Code:200 OK (from cache)
我的回答是設置爲:
$response = new Response;
$response->expire();
$response->headers->addCacheControlDirective('must-revalidate', true);
$response->headers->addCacheControlDirective('allow_reload', true);
我在做什麼錯?沒有任何文檔方法似乎工作...
太棒了!非常感謝Gatisl!像魅力一樣工作! – rat4m3n
這是一個救生員。 FWIW,它與Silex以及Symfony2的HTTP組件一起使用效果很好。 – neemzy