-
-
Notifications
You must be signed in to change notification settings - Fork 27
Added CacheFlushed Event
#850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@huangdijia has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 14 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Walkthrough此次提交的更新主要涉及缓存系统接口及仓库的变更。 Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Repository
participant Driver
Client->>Repository: flush()
Repository->>Repository: 调用 clear()
Repository->>Repository: 分发 CacheFlushing 事件
Repository->>Driver: 调用 driver->clear()
Driver-->>Repository: 返回结果 (boolean)
alt 结果为 true
Repository->>Repository: 分发 CacheFlushed 事件
end
Repository-->>Client: 返回结果
Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
在 `Repository` 类中添加 `getDriver` 和 `getStore` 方法,用于获取缓存驱动实例。同时在 `CacheInterface` 接口中声明这两个方法,确保一致性。`getStore` 是 `getDriver` 的别名,提供更直观的访问方式。
重构缓存模块,将原有的 CacheInterface 替换为 Repository 接口,以统一命名并提高代码的可维护性。此次更改涉及多个文件,包括 Repository.php、CacheInterface.php 等,确保所有相关依赖项都更新为使用新的 Repository 接口。
将弃用信息中的 `RepositoryInterface` 替换为 `Repository`,以保持一致性并避免混淆。
在 ConfigProvider 中标记了 v3.2 版本中将被移除的依赖项,以便为未来的代码清理做准备。
为了简化代码并提高可维护性,使用 `class_alias` 将 `CacheInterface` 替换为 `Repository`。此更改不影响现有功能,但为未来的版本升级做好准备。
重构 Repository 构造函数,将 ContainerInterface 作为依赖注入,以便动态获取 EventDispatcherInterface 实例。这提高了代码的灵活性和可测试性。
* Add CacheFlushed Event * feat(缓存): 添加获取驱动和存储的方法 在 `Repository` 类中添加 `getDriver` 和 `getStore` 方法,用于获取缓存驱动实例。同时在 `CacheInterface` 接口中声明这两个方法,确保一致性。`getStore` 是 `getDriver` 的别名,提供更直观的访问方式。 * refactor(cache): 将 CacheInterface 替换为 Repository 接口 重构缓存模块,将原有的 CacheInterface 替换为 Repository 接口,以统一命名并提高代码的可维护性。此次更改涉及多个文件,包括 Repository.php、CacheInterface.php 等,确保所有相关依赖项都更新为使用新的 Repository 接口。 * docs(cache): 更新弃用信息中的接口引用 将弃用信息中的 `RepositoryInterface` 替换为 `Repository`,以保持一致性并避免混淆。 * refactor(cache): 标记 v3.2 中将被移除的依赖项 在 ConfigProvider 中标记了 v3.2 版本中将被移除的依赖项,以便为未来的代码清理做准备。 * refactor(cache): 使用 class_alias 替换 CacheInterface 为了简化代码并提高可维护性,使用 `class_alias` 将 `CacheInterface` 替换为 `Repository`。此更改不影响现有功能,但为未来的版本升级做好准备。 * refactor(cache): 重构 Repository 构造函数以支持容器注入 重构 Repository 构造函数,将 ContainerInterface 作为依赖注入,以便动态获取 EventDispatcherInterface 实例。这提高了代码的灵活性和可测试性。 --------- Co-Authored-By: Deeka Wong <8337659+huangdijia@users.noreply.github.com>
Summary by CodeRabbit
CacheFlushed和CacheFlushing事件类,以支持缓存清除操作的事件处理。getDriver和getStore方法,增强缓存仓库的功能。Repository接口替代旧的CacheInterface。