How to use the Cache Droplet in Oracle ATG to improve performance

The main page of a typical ATG Commerce Website often has many targeters and other rich content which is computer-resource intensive.
Often, the easiest way to speed up the load time of a home page is to wrap any targeters within a
Cache droplet:

<dsp:droplet name="/atg/dynamo/droplet/Cache">
<dsp:param name="key" value="${category.repositoryId}_${userLocale}"/>
<dsp:oparam name="output">
....
</dsp:oparam>
</dsp:droplet>

The key parameter needs to be sufficiently unique. For example if your home page has a version for each locale then a key should be part of the cache key.

The following caveats apply:

1. Ideally, no personalization rules should exist in the targeters. I.e. targeter rules should apply to all users.
2. Using the cache droplet increases the memory usage of the application.
3. Any deployment from CA will invalidate all the items in the cache droplet. This means that after a deployment, the home page load times will sharply increase.
4. Product availability changes will not be visible in the home page until the cache entry expires.

The following properties control the behavior of the cache:

cacheCheckSeconds – the number of seconds which an entry in the cache takes to expire
purgeCacheSeconds – the number of seconds for the whole cache content to be purged

How to create private/public ssh keys in Linux

If you want to use ssh to access different servers in your network but you don’t want to always type your password, then follow these steps:

ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa

Now copy your public ssh key to the server you want to access remotely:

Example: scp ~/.ssh/id_rsa.pub :/tmp/

Now login to the server and add the id_rsa.pub key to ~/.ssh/authorized_keys

cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys
rm /tmp/id_rsa.pub