Caching using Terracotta
In Chapter 1, Architectural Best Practices, we talked about various caching options for our Liferay-based solution. We discussed using Terracotta as a centralized cache server. If the portal is designed to handle huge amounts of traffic and transactions, it will need a good amount of cache to provide the best performance. In such situations, it is recommended to go with a high-end, centralized cache server. Terracotta is one of the most popular products in this space. We can configure Liferay Portal to cache resources in Terracotta instead of in embedded Ehcache. Let's learn how to configure Liferay Portal to cache resources in a Terracotta server. We will configure Terracotta-based caching for our clustered setup using the following steps:
Download and install Terracotta in a directory on a separate server. This directory is referred to as
TERRACOTTA_HOME
.Note
The Terracotta community edition can be downloaded from http://terracotta.org/downloads/open-source/catalog...