`
kirenenko04
  • 浏览: 145924 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

Site Maintenance

 
阅读更多

 Site Maintenance

Site & Page Caching

Page download time is a critical factor in keeping visitors in your storefront. The longer it takes to download a page, the higher your risk of losing a sale. Therefore, it is best to cache your pages as much as possible to minimize page download times.

 

Furthermore, rendering pages containing many business objects or complex calculations such as category and search result pages or product detail pages can consume a lot of resources. Since this information generally does not change from one user to another, not caching these pages can excessively waste processing resources which will slow down the entire site for all users (including job processing) and not just for the requested pages.

 

In Demandware, caching is controlled on a per page basis, via the ISML template for the page. Caching is set on a page using the <iscache> tag:

<iscache type="relative" hour="24">

 

These are the rules when using the tag:

  • If <iscache> tag occurs multiple times in a template or its locally included templates, the shortest duration is used

  • Caching from a local include affects the including template

  • If there is no <iscache> defined, the template is not cached

Caching Parameters

The following parameters can be set with the <iscache> tag:

  • status = "off|on"

    • off disables page caching

    • on enables page caching (the default)

      This setting allows for caching to be turned on and off programmatically. status="off" is considered the shortest duration, so be careful when using it on an included template (see rules above).

  • type = "relative | daily"

    • Relative allows you to specify a certain period of time(一段时间), in minutes and hours, after which the page will be deleted from the cache. Daily allows you to specify a specific time when the page will be deleted from the cache.

  • hour = integer

    • Indicates either the caching duration or the time of day. If the type attribute is set to daily, the hour value must be an integer ranging from 0 to 23. If type is set to relative, all integer values greater than 0 are valid (the default value is 0, meaning either the page is never cleared from the cache or only the minute attribute is relevant).

  • minute = integer

    • Indicates either the caching duration or the time of day. If the type attribute isset to daily, the minute value must be an integer ranging from 0 to 59. If type is set to relative, all integer values greater than 0 are valid (the default value is 0, meaning either the page is never cleared from the cache or only the hour attribute is relevant).

  • varyby="price_promotion"

    • Lets you mark a page as personalized(标记个性化页面): this does not mean that the page is unique for a person but rather that different versions of the same page showing different prices, promotions, sorting rules or AB test segments will be cached by the Demandware platform. For example, this parameter is necessary for product pages since a customer belonging to a customer group might get special promotions that other customer groups don’t get. While the ISML template is the same, the generated pages vary, and therefore caching every version of the page benefits performance. For performance reasons, a page should only be marked with the varyby property if the page is really personalized; otherwise, the performance canunnecessarily degrade.

Frequently changing pages benefit 有利于 from a shorter caching period. Stored pages are only invalidated and a new one pulled from the Application Server if:

频繁更改页面从减少cache周期做起,存储页面被废除。一个新的从app server中调出。

  • The defined caching time is exceeded, or

    定义cache时间为溢出的

  • A replication has been performed (with the exception of coupons and geolocation data), or

    一个复制已经被执行(除了coupons 和地理信息)

  • An explicit page cache invalidation is triggered by a merchant in BM

    明确的页面缓存删除被商家从后台触发

As a best practice, disable page caching on sandboxes, development and staging environments in order to see changes immediately. In Production caching is always on by default.

 

部分页面缓存

Portions of pages(部分页面) can be cached separately(分开). You can assemble a page from snippets(片段) with different caching attributes using remote includes. Each part:

  • Has to be a result of a pipeline request to the application server

  • Is included using the syntax:

    <isinclude url=""> or the <iscomponent pipeline=….>

  • Can have different cache times or no caching at all

In general, do not cache pages that show buyer or session information.

Studying Page Analytics to Determine Caching Problems

Demandware provides caching metrics under the Site  Analytics  Technical Reports menu. The Pipeline Performance report will capture information.

These types of analytics are not collected on sandboxes, only on Production instances. While this chart is hard to read, it reveals that the Home-Show pipeline (which generates the homepage) is not cached: the Caching column shows red for all hits. If you see this trend in your analytic data, you may decide to alter the caching settings or the caching interval.

 

Across Demandware customers the two critical metrics we look at from a pipeline performance perspective are the average response times of Search-Show and Product-Show pipelines.

 

For Search-Show the average response is 400ms. Customers should be <= to this value to be in a good performance range.

 

For Product-Show the average response is 320ms-400ms. Customers should be <=to this value to be in a good performance range.

 

Demandware strongly recommends that you check analytics reports each week and after you make code changes to track these metrics.

 

Page Level Caching

 

Once the <iscache> tag is added to an ISML template, the entire ISML page will be cached for the time specified in the tag.

 

For example, the page below will be cached for 1 hour and 30 minutes:

<iscache type=”relative” hour=”1” minute=”30” >

 

Partial Page Caching

Most of the time, a single page should not be cached completely. Some parts of the page should be cached, while not others. In this case you need to use remote includes for every part that has unique caching characteristics. Every remote include calls a different pipeline which generates an ISML template, each template having (possibly) different page caching.

 

The syntax for a remote includes uses the URLUtils class to call a remote pipeline with optional parameters appended:

<isinclude  url="${URLUtils.url('Page-Include', 'cid', 'COOKIE_TEST')}">

 

You can also use the newer <iscomponent> tag to implement a remote include.

<iscomponent pipeline="Product-IncludeLastVisited" />

 

Using the Storefront Toolkit to Determine Cache Settings

You can enable the Cache Information tool in the Storefront Toolkit to see how partial page caching is implemented for a page:

 

The page will now show special icons that you can click to reveal how the whole page and its remote includes are cached.

 

Site Performance 网站性能

The Pipeline Profiler Pipeline分析器) is a tool in BM that gives you insight into pipeline and script performance.

 

It is located in Administration > Operations > Pipeline Profiler.

 

Code Replication 代码复制

Code replication is set and managed in BM. Once you have uploaded a new code version to the P.I.G. staging instance, you can set code replication to occur between staging and development or staging and production.

 

Code Replication Overview

In a typical development environment, a source management system is used for code version control. Each developer uses their own sandbox for development, while checking in their code to a source management system. 在典型的开发环境,一个资源管理系统用于版本控制。每一个开发人员使用自己的sandbox来开发,在资源管理系统检查他们的代码

 

UX Studio integrates with SVN for source management.

可以使用UX Studio 集成到SVN 资源。

 

When a developer has tagged a new code version and is ready to upload the new code to staging, he/she creates a new code version on STAGING in BM

Administration > Site Development > Code Deployment

当一个开发人员标记了一个新的代码版本,准备上传代码到staging,他创建一个新的版本在STAGING上:

Administration > Site Development > Code Deployment

 

Next, the developer uploads custom cartridges with Studio or WebDAV client using 2-factor authentication and tests the storefront in STAGING. A rollback to a previous version is available.

然后,开发人员上传自定义cartridge,使用studio或者WebDAV 客户端 ,

通过两个因素的验证,测试staging上的前台页面,可以允许回滚到上一个版本。

 

For major code changes, it is recommended to use a sandbox for testing

对于主要代码的调整,推荐使用sandbox来做测试。

 

For testing in a sandbox, you will need to export site data to the global directory from staging and import it into your sandbox using the Site Import/Export module in Business Manager.

sandbox做测试,你需要从staging导出site数据到全局目录, 然后导入它到你的sandbox. 使用BMImport/Export 模块。

 

When code meta data (site preferences, new attributes, etc.) needs to be tested, a replication from STAGING to DEVELOPMENT should be performed by a build engineer:

当代码的meta-data需要被测试(站点参数,新属性)需要被测试。一个从stagingdevelopment的复制需要被执行。

 

This is also good practice for testing processes without impacting the production storefront (i.e. Product import feed).

这也对测试过程,不影响生产环境有好处。

 

The last step in code replication is moving code from STAGING to PRODUCTION.

最后一步在复制代码过程中是移动代码从staging到生成环境

 

This process is also performed in Business Manager.

这个步骤也在BM中执行。

 

Data Replication 数据复制

Data replication is a process to promote merchant edits, product and system objects from Staging to Production (or Development). The best practice is to replicate to development first, verify that data and storefront work and then replicate from staging to production.

 

Data can be replicated granularly: 数据可以被选择性复制

  • Organization objects

  • Per Site objects

     

A Data Replication process consists of two phases:

Transferlong running processes where data is copied from STAGING intoshadowtables and folders on PRODUCTION. No changes are shown in storefront.

PublishingVery fast process. Changes in “shadow” tables and folders become active, page cache is cleaned, and the new version is shown in storefront.

 

After data has been replicated, a one-time rollback (undo) is possible. This reverses the data to the state of the last successful replication.

 

You can view the progress of a replication by monitoring the staging logs on the staging and production instance.

 

Just as code replication is set up in Business Manager, so is data replication. The process is almost identical with the exception of being able to select which data you want to replicate.

与代码导入不同的是可以选择性复制

 

Just as code replication can only occur between STAGING and DEVELOPMENT or STAGING and PRODUCTION, so too is the data replication process only allowed one-way from STAGING to the other primary instances.

 

分享到:
评论

相关推荐

    BSC6900 UMTS Site Maintenance Guide(V900R012C01_06).pdf

    BSC6900 UMTS Site Maintenance Guide(V900R012C01_06).pdf

    IDCFIBER.docx

    On site installation and on-site maintenance of communication pipeline, communication cable, optical cable laying and installation engineering, comprehensive wiring engineering, computer and ...

    Joomla! 宝典.pdf

    Part V: Site Maintenance and Management Chapter 25: Keeping Your Site Secure and Up to Date Security Best Practices Keeping Up With Security Notices Managing Site Maintenance Upgrading a Joomla! ...

    The CSS Anthology: 101 Essential Tips, Tricks & Hacks, 3rd Edition

    Reduce the burden of site maintenance and updates. … along with 92 other solutions to common questions and problems. The CSS Anthology: 101 Essential Tips, Tricks & Hacks is ideal for Web designers ...

    CSS 2.1 Specification

    This specification defines Cascading Style Sheets, level 2 revision 1 (CSS 2.1). CSS 2.1 is a style sheet language that allows authors ...documents, CSS 2.1 simplifies Web authoring and site maintenance.

    Drupal 6 Site Builder Solutions, Build powerful web site features for your business and connect to your customers through blogs, product catalogs, newsletters, and maps

    Everybody knows that a business needs a website for its growth and customer interface. However, building a ... * Essential maintenance tasks: upgrading Drupal, keeping backups, and optimizing performance

    Communicating Design: Developing Web Site Documentation for Design and Planning

    From usability reports to project plans, content maps, flow charts, wireframes, site maps, and more, each chapter includes a contents checklist, presentation strategy, maintenance strategy, a ...

    opengever.maintenance:GEVER维护包

    设置调试模式$ bin/instance debug...&gt;&gt;&gt; from opengever.maintenance import dm&gt;&gt;&gt; dm()INFO: Using Plone Site 'mandant1'.&gt;&gt;&gt; plone( opengever.maintenance.dm是方便导入,实际上指向opengever.maintenance....

    django-site-maintenance:django应用程序将网站置于“维护模式”

    Django网站维护(DSM) 维护模式实用程序,可让您通过命令行将django项目置于脱机模式。 与其他实现的主要区别在于DSM完全断开了django的连接,因此您可以: 升级您的代码(即pip install --upgrade) ...

    Building Scalable Web Sites 英文版

    Providing services APIs and using services from other providers to increase your site's reach and capabilitiesWhether you're starting a small web site with hopes of growing big or you already have a ...

    django-maintenance-management-site:维护管理网站

    维护管理网站 这是一个Django项目,可帮助维护部门执行任务。 该网站提供了访问公司下所有备用库存零件,电气原理图和用户手册的功能。 每个都带有一个QR码,可链接到特定项目。 QR码已打印在生产设备上,以简化维护...

    TamoGraph Site Survey

    Wireless network deployment and maintenance requires the use of a professional RF site survey tool that facilitates otherwise time-consuming and very complex tasks, such as ongoing analysis and ...

    TamoGraph wifi信号分析

    network deployment and maintenance requires the use of a professional RF site survey tool that facilitates such tasks as ongoing analysis and reporting of signal strength, noise and interference, ...

    asa912-k8.bin

    The images are fully supported by Cisco TAC and will remain on the download site only until the next Maintenance release is available. If you do not have a specific problem which is resolved by an ...

    《Better WordPress Development》- 2017 PDF 英文原版

    Your Regular WordPress Maintenance Checklist by Adrian Try How to Use Ajax in WordPress by Sayed Rahman Using Font Awesome with WordPress by Simon Codrington How to Optimize Your WordPress Site’s ...

    drupal 6.12

    // $Id: INSTALL.txt,v 1.61.2.4 2008/07/09 19:15:59 goba Exp $ CONTENTS OF THIS FILE --------------------- * Requirements * Optional requirements * Installation ...7. CRON MAINTENANCE TASKS...

    Beginning_Joomla__From_Novice_to_Professional

    ment, deployment, and maintenance. It’s also done its fair share to beautify the web world. By using Joomla, you can instantly banish ugly, poorly structured interfaces from your web sites—even the ...

    Building Scalable Web Sites 英文 PDF

    Providing services APIs and using services from other providers to increase your site's reach and capabilitiesWhether you're starting a small web site with hopes of growing big or you already have a ...

    Assignment 004: Lab IV Log Analyzer

    Such information might help managers to determine, for instance, whether they need to upgrade to more powerful server machines, or when the quietest periods are in order to schedule maintenance ...

Global site tag (gtag.js) - Google Analytics