【发布时间】:2011-09-20 13:30:01
【问题描述】:
如何重新声明Contoroller函数renderView函数(无硬编码)?
如何查找树枝缓存(我认为它应该是 HttpCache 类中的查找函数,但它说 Fatal error: Call to a member function isNotModified() when I try redefine it ),并将其写入内存缓存?
Symfony2 中是否有原生内存缓存设置与 twig 一起使用?
【问题讨论】:
如何重新声明Contoroller函数renderView函数(无硬编码)?
如何查找树枝缓存(我认为它应该是 HttpCache 类中的查找函数,但它说 Fatal error: Call to a member function isNotModified() when I try redefine it ),并将其写入内存缓存?
Symfony2 中是否有原生内存缓存设置与 twig 一起使用?
【问题讨论】:
isNotModified 是HttpFoundation\Response 上的一个方法,它接受HttpFoundation\Request 对象并检查请求的lastModified 和ETags。您不应该直接使用HttpCache,而是查看Response 和Request 类以查看它们的API。还有一个 Symfony 文档click here
【讨论】: