Doctrine 查询缓存仅适用于给定应用程序

发布于 2024-12-13 19:03:35 字数 205 浏览 7 评论 0原文

是否有可能启用 给定应用程序的 Doctrine 查询缓存? 在 Configuration.class.php 中尝试过,但没有运气。

Is there any possibility to enable Doctrine's Query Caching for a given application?
Tried in Configuration.class.php, but without luck.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

芸娘子的小脾气 2024-12-20 19:03:35

您可以将您的: 添加

  public function configureDoctrine(Doctrine_Manager $manager)
  {
    // Doctrine_Cache_Apc in the example
    $manager->setAttribute(Doctrine::ATTR_QUERY_CACHE, new Doctrine_Cache_Apc());
  }

到您的:

/<project_path>/apps/<app_name>/config/<app_name>Configuration.class.php

You can add your:

  public function configureDoctrine(Doctrine_Manager $manager)
  {
    // Doctrine_Cache_Apc in the example
    $manager->setAttribute(Doctrine::ATTR_QUERY_CACHE, new Doctrine_Cache_Apc());
  }

to your:

/<project_path>/apps/<app_name>/config/<app_name>Configuration.class.php
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文