static export on demand模式会删除已经导出的文件

如果你使用org.opencms.staticexport.CmsOnDemandStaticExportHandler作静态导出,有个地方需要注意,当你修改一个资源,并且发布这个资源,你会发现,之前静态导出到RFS(real file system)的文件会被删除,这是怎么回事呢?下面是opencms的官方解释

  • the static export on demand creates a copy of a resource in the RFS (Real File System) the first time this resource is requested while browsing the online project.
    So following requests will be resolved faster by just displaying the previous created RFS-copy of the resource, instead of creating each time dynamically every resource, an operation that may involve complex logic and expensive database access.
  • the after-publish static export writes out pages after a  content was published, so that the RFS contains a full copy of a site.
    This after-publish export can also be initiated by starting it in the database management in the administration view of the workplace.

由于,opencms为了保证静态导出的资源是最新的,当你发布了某个资源后,它会删除静态文件,那删除了总得重新生成吧?

什么时候生成呢?别急,进入Online project(就是opencms才作界面的右上角,下拉菜单选择online),然后重新访问一下你刚才发布的文件。这样opencms会重新静态导出,你刚才发布的文件。

你可能感兴趣的:(Access)