English 中文(简体)
缓存块/视图或面板中的元素更好吗?
原标题:Is it better to cache an element in the block/view or the panel?

我正在创建一个面板页,它将从视图中拉入块?我想缓存这些块。那么,是在面板中启用该元素的缓存更好,还是在块/视图页面中创建该元素的位置进行缓存更好?或者这有关系吗?

仅供参考,页面的其他区域过于动态,我无法使用其他方法缓存整个页面

最佳回答

转到顶级,以更快地获得缓存版本。在这种情况下,这将是面板页。

这也将缓存整个窗格,而不仅仅是缓存其中的内容,无论是块、视图还是其他内容。

问题回答

如果您有一个面板,其中包含视图的块显示,则说明您做得不对(可能)。您应该使用视图的内容窗格显示,以便在面板中使用。

也就是说,只使用最外层的缓存,所以如果缓存面板,并将块缓存在面板内,将视图缓存在块内,那么实际上只使用面板缓存。





相关问题
Drupal Multi-language: Simple strings not translated

I m adding additional languages to a Drupal site that I m building. Getting the translation of content working is fairly easy using the Internationalisation module. Yet, simple things such as date ...

Setting up a WYSIWYG editor for Drupal site users [closed]

Looking through the Drupal contrib modules, and after a few Google searches, it becomes evident that there are any number of choices and combos available to set up a WYSIWYG editor in Drupal. I m ...

Change size of user/password login box

I don t know how to change the size of the login username/password boxes on the drupal site that I m trying to build. I m stumbling through the theming, and don t know where to find the file that ...

How does Drupal provide an edit/review/publish model?

How does Drupal support a means to update and review a website before it is published? Does it only allow you to preview a page at a time before you publish it or is there a way to create a site ...

Term for rotating header

I m looking for terminology that describes this behavior: The header of a web-page contains a different image every time you visit it. Update: It is not an advertisement, but images related to the ...

Has anyone checked out Drupal 7? [closed]

Has anyone checked out a copy of Drupal 7 yet? What do people think? I m pretty excited about the PDO and all of the designers I work with a very excited about the new admin interface/structure. Do ...

热门标签