【问题标题】:How to create a static file cache in HHVM如何在 HHVM 中创建静态文件缓存
【发布时间】:2017-01-04 21:26:23
【问题描述】:

我们正在 HHVM 上以 Repo Authoritative 模式运行一个网站。

我可以使用hhvm --hphp -thhbc 编译代码文件。 但是,似乎还有一个使用-tfilecache 创建静态文件缓存的功能,它将用于提供静态文件,但我无法让它工作。关于此功能的文档很少,我在 Google 上找不到任何内容。

我正在生成这样的文件列表:

find . -type f -not \( -name '*.php' -or -name '*.phtml' \) >/tmp/staticfiles

并尝试像这样生成缓存:

hhvm --hphp -t filecache -v AllVolatile=true --input-list /tmp/staticfiles -l3

(为详细日志添加-l3)

结果总是:

running hphp...
creating temporary directory /tmp/hphp_H98a3V ...
parsing inputs...
parsing inputs took 0'00" (145 us) wall time

Assertion failure: /tmp/tmp.jRkkBo6M6b/hphp/compiler/analysis/analysis_result.cpp:79: virtual HPHP::AnalysisResult::~AnalysisResult(): assertion `!m_finish' failed.


Core dumped: Aborted
Stack trace in /tmp/stacktrace.1767.log
hphp failed
running hphp took 0'01" (1257721 us) wall time

该堆栈跟踪文件中没有任何内容。

我尝试过只使用列表中的一两个文件,结果相同。在 RHEL 7.2 上具有 HHVM 1.14.2 和 1.14.4 的经验。

这是一个错误还是我做错了什么?

【问题讨论】:

  • 对我来说看起来像一个错误。我在 HHVM 上也遇到了同样的问题

标签: hhvm


【解决方案1】:

我打开了bug,他们很快就回来了

您可能希望同时创建存储库和文件缓存。您可以将 --file-cache /where/to/create/cache 传递给用于构建 hhbc 存储库的命令。

这就像一个魅力,我不知道你可以同时做这两个。

他们确实打开了这个错误,所以它看起来也应该独立工作。不过这个方法对我来说已经够用了(其实更好)

【讨论】:

    猜你喜欢
    • 2019-12-06
    • 1970-01-01
    • 2017-10-19
    • 1970-01-01
    • 1970-01-01
    • 2019-04-14
    • 2020-07-31
    • 1970-01-01
    • 2021-05-11
    相关资源
    最近更新 更多