Zend Cache 无法使用 Action Helper 工作
我正在尝试在我的 Zend Framework 应用程序中实现全页静态缓存。使用静态后端与 Capture 前端相结合,可以缓存整个页面,并在将来通过 .htaccess 重定向提供服务,直到删除/重新生成缓存。作为参考,我一直在使用 Zend_Cache_Backend_Static 部分手册中,还提供了一些更多信息由班级作者。
根据示例,我已经配置了缓存目录(静态 HTML 文件)及其标签,并且已将以下行添加
$this->_helper->cache(array('index'), array('allentries'));
到我的控制器之一。
HTML 文件已创建在正确的位置,并且标签也按预期创建。然而,HTMl 文件始终为空 - 0 字节。
我无法诊断问题,也无法在网上找到任何可以提供帮助的信息。据我所知,从 Zend 应用程序接收输出的输出缓冲回调存在一些问题,但我不知道到底出了什么问题。
有人能解释一下这个问题吗?
I'm trying to implement full page static caching in my Zend Framework application. Using the Static backend coupled with the Capture frontend, whole pages can be cached, and served by a .htaccess redirect in the future, until the cache is deleted/regenerated. For reference, I've been using the section on Zend_Cache_Backend_Static in the manual, and also some further information provided by the class author.
As per the example, I have configured the directories for the cache (static HTML files) and their tags, and I have added the line:
$this->_helper->cache(array('index'), array('allentries'));
to one of my controllers.
The HTML file is created in the correct place, and the tags are also created as expected. However, the HTMl file is always blank - 0 bytes.
I can't diagnose the problem, and I can't find any information online to help. As far as I can see it's some problem with the Output Buffering callback which receives the output from the Zend app, but I don't know precisely what's wrong.
Can anybody shed some light on the issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番绞尽脑汁后,我找到了答案:
...在应用程序 INI 文件中。
After a lot of head scratching, I found the answer:
...in the application INI file.