河马cms缓存方法 [英] Hippo cms cache method

查看:73
本文介绍了河马cms缓存方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

河马cms使用哪种缓存?

What kind of cache Hippo cms is using?

我在官方页面上找到了有关捆绑存储缓存的一些信息,但我不知道信息存储在何处以及如何获取它们.

I found something about bundle cache on official page, but I don't have idea where information are stored and how get them out.

主要问题是我需要在许多Hippo cms应用程序实例之间同步L2cache.

Main problem is I need synchronize L2cache between a lot of instances of Hippo cms application.

推荐答案

Hippo CMS已在整个体系结构的多个不同级别上实现了缓存.重要的是要记住,河马堆栈具有3个主要组成部分:

Hippo CMS has caching implemented at several different levels of the overall architecture. It's important to keep in mind that the Hippo stack has 3 main components:

  1. 内容存储库(由RDBMS支持)
  2. 河马交付层(HST)
  3. 河马CMS用户界面

我的假设是您可能正在尝试为应用程序的交付部分执行此操作.让我们采取一种自下而上的方法,看看可以使用哪些不同类型的缓存.

My assumption is that you're probably trying to do this for the delivery part of the application. Let's take a bottom-up approach and see what different types of caching are available.

  1. 内容存储库将来自持久性层的原始数据缓存在捆绑缓存中.这是Apache Jackrabbit提供的内存中缓存,其大小可以在repository.xml中进行配置.如果您将其与例如Hibernate进行比较,则已经可以将其视为L2缓存,因为它已由所有JCR会话共享.您可以在相应的文档页面上找到有关如何调整此缓存的更多信息.

Hippo交付层使用从存储库配置和四个不同的高速缓存派生的一对内存中模型表示形式:二进制高速缓存,WebFiles高速缓存,节点高速缓存和页面高速缓存.

The Hippo delivery tier uses a couple of in-memory model representations derived from repository configuration and four different caches: Binaries Cache, WebFiles Cache, Node Cache and Page Cache.

Binaries缓存用于缓存存储在内容存储库中的静态资源,例如PDF和图像.可以配置为从内存或磁盘提供服务.二进制缓存在后台使用Ehcache.有关如何配置或指定自己的缓存的更多信息,请参见

The Binaries Cache is used to cache static resources that are stored in the content repository, such as PDFs and images. It can be configured to be served from memory or disk. The binaries cache is using Ehcache in the background. More information on how to configure or specify your own cache can be found here.

WebFiles缓存还用于缓存存储库中的静态资源,但是它通常不是开发人员的静态Webapp内容,而是通常的PDF和图像之类的用户内容.

The WebFiles Cache is used to also cache static resources from the repository, but instead of typically user content like PDFs and images, it is more developer static webapp content.

节点高速缓存将高速缓存从内容存储库中检索到的各个JCR节点的内容.这包括实际的内容项(文档)以及存储在存储库中的配置,例如网页布局和URL映射.当修改存储库中的原始节点时,观察模式用于使节点高速缓存条目无效.

The Node Cache caches the contents of individual JCR nodes retrieved from the content repository. This includes actual content items (documents) as well as configuration stored in the repository such as web page layouts and URL mappings. The observation pattern is used to invalidate node cache entries when the original node in the repository is modified.

页面缓存可缓存完整的聚合页面.这意味着只要不对构成页面的内容和配置进行任何修改,就可以直接从缓存中提供网页,而无需进行任何内容检索和页面聚合.一旦修改了其中任何一个,就可以通过观察来通知传递层,并使传递的页面无效.可以在聚合已修改页面的同时为到达的请求提供陈旧的高速缓存条目,以保持较低的响应时间.可以在此处找到更多信息.页面缓存基于ehcache,可以通过Spring配置进行配置.

The Page Cache caches complete aggregated pages. This means that web pages can be served directly from cache without any content retrieval and page aggregation as long as no modifications are made to the content and configuration making up the page. Once any of these is modified the delivery tier is notified through observation and invalidates the cached page. Requests arriving while the modified page is being aggregated can be served a stale cache entry to keep response times low. More information can be found here. The page cache is based on ehcache and can be configured through Spring configuration.

如您所见,有几种可用的缓存级别.但是必须记住,如果运行多个Hippo实例,则由于Hippo中群集和缓存失效的工作方式,所有实例上的缓存都会自动失效,因此最终您甚至不需要引入额外的缓存.

As you can see there are several levels of caching available. You have to keep in mind though that if you have multiple Hippo instances running, the caches will be automatically invalidated on all individual instances because of how clustering and cache invalidation works within Hippo, so in the end you might not even need to introduce additional caching.

您可以在性能文档页面中找到更多信息.

You can find more information on the performance documentation page.

这篇关于河马cms缓存方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆