website logo
โŒ˜K
๐Ÿ“Introduction
๐Ÿ“Essential Overview
Getting Started (What is Essential?)
The Essential Information Eco System
๐Ÿ“How to be Successful with Essential
Identify Stakeholders and Concerns
Prioritise Delivery
Identify/Define the Views that will support Delivery
Identify any Meta Model extensions required and the impacts
Identify the data required, data sources, and population method
Plan Training/Consultancy
Extend Launchpad and build integrations and views as required
Complete Portal and Repository set-up
Capture data
๐Ÿ“„Embed EA data management process to ensure data is maintained
Measure Value
๐Ÿ“How To Use Essential
Using Essential Overview
๐Ÿ“„Logging In and The Homepage
๐Ÿ“„Capturing and Maintaining Data
๐Ÿ“„Everyone's Essential Editors
๐Ÿ”Hints & Tips
๐Ÿ“„Bulk Data Imports
๐Ÿ“„Essential Import Utility - To Bulk Load Data
๐Ÿ“„Essential Viewer
๐Ÿ“„Set Up Support Tools
๐Ÿ“„Extending the Essential Meta Model
๐Ÿ“„System Administration
๐Ÿ“„Repository Administration
๐Ÿ“„Managing User Security
๐Ÿ“„Essential Product Releases and Updates
๐Ÿ“EA Tutorials
๐ŸŽ“Business Architecture
๐ŸŽ“Application Architecture
๐ŸŽ“Technology Architecture
๐ŸŽ“Information Architecture
๐Ÿ“„EA Support/Utilities
๐ŸŒEssential Meta Model Diagrams
Essential Meta Model (Overview)
Business Layer
Application Layer
Information/Data Layer
Technology Layer
EA Support
Meta Model Constructs
Essential Modelling Patterns/Definitions
๐Ÿ“How to Populate Essential Views
Roadmap Enablement and Scoping Frameworks
Enterprise Views
Business Views
Information Views
Application Views
Technology Views
๐Ÿ“Open Source
Open Source Overview
๐Ÿ› ๏ธOpen Source Multi-User
โš’๏ธOpen Source Installation
Accessing Essential OS
Essential OS Buttons
โ“FAQs
Modelling in Essential
Data Capture, Maintenance and Releases
Viewer
User Management and Security
Launchpad and Import Utility
Open Source Configuration
Docs powered by
Archbee
Open Source
Open Source Multi-User

Essential Viewer Cache

9min

Essential Viewer includes an open source web cache engine that can significantly improve the performance of Essential Viewer when rendering large or complex Views by caching the dynamically-rendered web pages.

By default and for simplicity, the web cache is disabled. However, you can easily enable the cache by making some simple configuration settings.

Overview

The configuration of the web cache is controlled in three parts:

  1. web.xml to prime Essential Viewer to use the web cache engine
  2. oscache.properties to control the configuration of the web cache engine
  3. essentialCache.xml to control how the cache is reset or cleared when receiving a new snapshot of the Essential repository or when using the Essential Maintenance Service

Web.xml

The first step to enabling the web cache is to tell Essential Viewer to use the caching engine. This is controlled separately for each Essential Viewer instance (in cases where multiple Essential Viewers are in use).

This is controlled in the file web.xml, which is found in the WEB-INF folder in every Essential Viewer installation, e.g.

C:\Program Files\Tomcat\webapps\essential_viewer\WEB_INF\web.xml

All the settings to enable the cache are already included in web.xml but are commented out and therefore not active. Open the file in a text editor such as TextEdit, Notepad or your favourite IDE. Scroll down to find the line:

Directly after this line, a section starting with is commented out by the XML / HTML comments:

starting with <!โ€” and ending with โ€”>

These comments must be removed.

ย <!-- Settings for Caching filter --> ย  ย  ย  ย  ******<!--*****<filter> ย  ย  ย  ย  ย  ย  ย  ย  <filter-name>CacheFilter</filter-name> ย  ย  ย  ย  ย  ย  ย  ย  <filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class> ย  ย  ย  ย  ย  ย  ย  ย  <init-param> ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  <param-name>time</param-name> ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  <param-value>-1</param-value> ย  ย  ย  ย  ย  ย  ย  ย  </init-param> ย  ย  ย  ย  ย  ย  ย  ย  <init-param> ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  <param-name>scope</param-name> ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  <param-value>application</param-value> ย  ย  ย  ย  ย  ย  ย  ย  </init-param> ย  ย  ย  ย  ย  ย  ย  ย  <init-param> ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  <param-name>expires</param-name> ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  <param-value>off</param-value> ย  ย  ย  ย  ย  ย  ย  ย  </init-param> ย  ย  ย  ย  </filter> ย  ย  ย  ย  <filter-mapping> ย  ย  ย  ย  ย  ย  ย  ย  <filter-name>CacheFilter</filter-name> ย  ย  ย  ย  ย  ย  ย  ย  <url-pattern>/report</url-pattern> ย  ย  ย  ย  </filter-mapping>******-->******

Remove these comment characters (<!โ€” and โ€”> marked between the 5 *'s at the top and bottom) - preserving all the details of the and - and save the file.

Cache Configuration

Now that Essential Viewer is primed to use the web cache, the configuration is completed by setting up the cache itself. First, we must tell the web cache engine where to maintain the cache on the local server filesystem.

The cache configuration is managed in a file called oscache.properties which are found in WEB-INF/classes. Open this file in a text editor and find the section labelled: CACHE DIRECTORY. Following the guidance in the file, set the cache.path parameter to define the directory that the cache should use to store the generated web pages. We strongly recommend that you use the pageCache folder in the graph_images folder in Essential Viewer.

NOTE: the path you specify MUST be within your chosen Essential Viewer deployment.

The important point here is to set the full path to the Essential Viewer environment, which means updating the first parts of the example paths provided in the file. Note the use of โ€˜\\โ€™ characters to define the paths on Windows platforms.

Update the section marked between the 5 *'s in the cache.path shown in the following example:

e.g.

\# Note: for Windows machines, this needs \\ to be escaped # \# For \*ix example: \# cache.path=/Applications/apache-tomcat-7.0.16/webapps/essential\_viewer/graph\_images/pageCache # \# For Windows example: \# cache.path=C:\\\\Program Files\\\\Apache Software Foundation\\\\Tomcat #6.0\\\\webapps\\\\essential\_viewer\\\\graph\_images\\\\pageCache cache.path=*****D:\\\\Essential\\\\Tomcat\\\\webapps\\\\essential\_viewer*****\\\\graph\_images\\\\pageCache

Ensuring the cache is cleared when updating the repository

The last step of the configuration is to prime the Essential Viewer platform to ensure that the cache is reset or cleared down whenever a new version of the repository snapshot is published to the Viewer.

This is controlled in the file platform/viewerCache.xml by a directory tag that specifies the folder used in the Cache Configuration with the addition of /application.

If you have used the default location in the last step (graph_images/pageCache within your Essential Viewer) then your configuration is complete. If you have used an alternative location, update the following entry to point to the location of your cache, keeping the โ€œpostโ€ attribute unchanged.:

<!-- Define the cache directories to clear and when - either pre or post receiving the repository snapshot --> <cachedirectories> ย  ย  ... ย  ย  <directory when="post">*****graph\_images/pageCache*****/application</directory> </cachedirectories>

Once you have finished updating the file, save it.

Multiple Essential Viewer Deployments

If you have multiple Essential Viewers, this configuration must be repeated for each deployment for which you wish to enable the web cache capability.

Restart Tomcat

Having completed the configuration and saved all the updated files, you must restart Tomcat for these to be activated. When Tomcat has restarted, you will see your cached Views being created in the cache folder that you specified in the second step.

Updated 03 Mar 2023
Did this page help you?
PREVIOUS
Open Source Overview
NEXT
Enabling Collaboration
Docs powered by
Archbee
TABLE OF CONTENTS
Overview
Web.xml
Cache Configuration
Ensuring the cache is cleared when updating the repository
Multiple Essential Viewer Deployments
Restart Tomcat
Docs powered by
Archbee