Php esi标签不适用于laravel应用程序

Php esi标签不适用于laravel应用程序,php,caching,laravel-5,varnish,varnish-vcl,Php,Caching,Laravel 5,Varnish,Varnish Vcl,嗨,我有以下问题。我有一个运行Laravel5.1的网站,为了让很多用户都能访问该网站,并加快加载速度,我使用了Varnish4。我的清漆vlc文件如下 backend default { .host = "127.0.0.1"; .port = "80"; } sub vcl_recv { # Happens before we check if we have this in cache already. # # Typically you clea

嗨,我有以下问题。我有一个运行Laravel5.1的网站,为了让很多用户都能访问该网站,并加快加载速度,我使用了Varnish4。我的清漆vlc文件如下

backend default {
    .host = "127.0.0.1";
    .port = "80";
}

sub vcl_recv {
    # Happens before we check if we have this in cache already.
    #
    # Typically you clean up the request here, removing cookies you don't need,
    # rewriting the request, etc.    
    unset req.http.Cookie;
}

sub vcl_backend_response {
    unset beresp.http.Set-Cookie;
    set beresp.do_esi = true;
    set beresp.ttl = 1m;
    return(deliver);
}
正如您所看到的,我为所有请求启用esi Processing(这不是最佳做法,但我正在努力使事情正常进行),并删除vcl_recv子例程中的所有cookie

现在,我有一个带有esi:include块的刀片模板,如下所示:

<esi:remove>
    NO ESI SUPPORT
    <script>window.load_hot = true;</script>
</esi:remove>
<!--esi
    <p>The full text of the license: 
         <esi:include src="http://localhost/date.php" />
    </p>
-->

无ESI支持
window.load_hot=true;
esi include标记上的路由工作正常并返回预期输出。 Varnish系统按预期解析ESI块,因为未显示回退(显示无ESI支持)消息


那么,这段代码有什么不好的地方呢?

esi:include标记只采用一个路径,而不是一个包含协议和主机名等的完整URL,例如

<esi:include src="/cgi-bin/date.cgi"/>

请参阅:

已解决

出于某种原因:

<esi:remove>
    NO ESI SUPPORT
    <script>window.load_hot = true;</script>
</esi:remove>
<!--esi
    <p>The full text of the license: 
         <esi:include src="http://localhost/date.php" />
    </p>
-->

无ESI支持
window.load_hot=true;
由于标签原因,无法正常工作

如下所示移除标记后:

<esi:remove>
    NO ESI SUPPORT
    <script>window.load_hot = true;</script>
</esi:remove>

<p>The full text of the license: 
         <esi:include src="http://localhost/date.php" />
</p>

无ESI支持
window.load_hot=true;
许可证全文:


esi已开始按预期工作。

很抱歉,这不是问题所在。检查我的答案,它在esi:include标签上有一个绝对url