Book Image

Building Websites with OpenCms

Book Image

Building Websites with OpenCms

Overview of this book

This book takes you through the process of creating content-rich websites and applications using OpenCms. Although powerful and flexible, OpenCms can be daunting on first approach, but its advanced features reward the investment in learning. This book exists to ease Java developers into getting the most from OpenCms. OpenCms OpenCms is a professional-level, open source Website Content Management System, with which you can create and manage complex websites. Based on Java and XML technology, it fits into almost any modern IT environment. With hard-won experience of the practical difficulties faced by developers working with OpenCms, this book is the embodiment of the author's expertise, and the perfect way to master the system.
Table of Contents (12 chapters)
Building Websites with OpenCms
Credits
About the Author
Introduction

The FlexCache


When a JSP file is executed, it is first scanned by OpenCms. All files that point to the VFS are adjusted and then resources are copied to the real file system (into online or offline under $CATALINA_HOME/webapps/opencms/WEB-INF/jsp/). The JSP engine then parses the files into Java sourcecode, which it compiles into servlet class files. The FlexCache mechanism caches the results of dynamic elements (e.g. navigation) to expedite subsequent requests for the same content. FlexCache uses a Least Recently Used (LRU) policy, which maintains the most requested items in the cache while bumping out items that are not requested very often. The result is that the cache doesn't get bloated with rarely requested information, and it can make an intelligent tradeoff between size and performance.

JSPs are cached individually. That is, if a JSP includes two other JSPs, all three will be cached separately. This means that one component of a page can be cached while the rest are not. Once again...