Skip to content
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

希望提供针对JPA的二级缓存方案 #1586

Closed
guqing opened this issue Dec 10, 2021 · 3 comments
Closed

希望提供针对JPA的二级缓存方案 #1586

guqing opened this issue Dec 10, 2021 · 3 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@guqing
Copy link
Member

guqing commented Dec 10, 2021

描述一下此特性

目前所有的查询都会走sql不太友好,如果提供了jpa二级缓存方案那么就可以优化很多查询,例如提供 Ehcache 或者 redis 的二级缓存方案。

二级缓存优点:

  • 避免了已经加载对象的数据库访问
  • 对于频繁访问的未修改的对象读取更快

缺点:

  • 内存消耗较大

因此建议提供为可选方案,这样对那些文章非常多的用户提供了优化博客速度的选项

附加信息

No response

@ruibaby ruibaby added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 10, 2021
@niujinkai
Copy link

@ruibaby 可以限制缓存大小 可以解决一部分问题

@JohnNiang
Copy link
Member

目前已在 Halo 2.7.0 中提供了页面渲染结果缓存的功能,具体可参考:#4091

提供 JPA 的二级缓存方案暂时不考虑。理由如下:

  1. 目前数据量还不足以需要添加 JPA 的二级缓存来优化。
  2. 目前已经实现了页面渲染结果缓存,响应速度已经提升至几毫秒。

当前 Issue 即将被关闭。如果有任何问题可随时重新打开。

/close
/unassign

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Oct 12, 2023

@JohnNiang: Closing this issue.

In response to this:

目前已在 Halo 2.7.0 中提供了页面渲染结果缓存的功能,具体可参考:#4091

提供 JPA 的二级缓存方案暂时不考虑。理由如下:

  1. 目前数据量还不足以需要添加 JPA 的二级缓存来优化。
  2. 目前已经实现了页面渲染结果缓存,响应速度已经提升至几毫秒。

当前 Issue 即将被关闭。如果有任何问题可随时重新打开。

/close
/unassign

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants