novactive/ezsmartcacheclear-bundle

eZ Platform Bundle 提供缓存清除功能

0.1.0 2018-05-05 02:10 UTC

This package is auto-updated.

Last update: 2024-09-13 10:09:20 UTC


README

关于

这个 eZ Platform bundle 的目的是提供类似于 eZ publish 的智能缓存清除机制。

以下是一些可用的清除规则

  • 父级
  • 同级
  • 子级
  • 子树

安装

推荐通过 Composer 安装此 bundle。只需运行

composer require novactive/ezsmartcacheclear-bundle

在您的应用程序内核中注册该 bundle

// app/AppKernel.php
public function registerBundles()
{
    $bundles = [
        // ...
        new Novactive\eZSmartCacheClearBundle\NovaEzSmartCacheClearBundle(),
    ];

    ...

    return $bundles;
}

配置

一旦注册了该 bundle,您应该通过定义以下配置来配置您想要应用于内容类型的规则

nova_ez_smart_cache_clear:
    config:
        my_siteaccess:
            publish:
                -
                    content_type: my_content_type
                    rules:
                        parents: { enabled: true, nbLevels: 4 }
                        children: { enabled: true }
                        siblings: { enabled: true }
                        subtree: { enabled: true }

许可证

此 bundle 在 MIT 许可证下发布。请参阅 bundle 中的完整许可证

LICENSE