Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我们include($file)缓存是在内部自动完成的。
include($file)
如何做到这一点?
与您的评论结合使用时,您的问题是荒谬的。缓存字节码和能够缓存变量值是两个完全不相关的事情。
apc_store用于在共享缓存中存储变量。它与文件包含无关。
apc_store
APC还缓存 PHP 字节码。它会自动执行此操作,除非关闭apc.cache_by_default配置指令并按照手册页中的说明使用过滤器。
apc.cache_by_default
您可以通过检查配置指令的apc.enabled值来查看 APC 是否已启用。
apc.enabled
您不能让 APC 自动缓存变量。