The event cache or rules cache as it's sometimes known is one of the most misunderstood areas of the Tivoli Enterprise Console. This tip aims to demystify the Event Cache, it's purpose, it's day to day running and most importantly it's configuration.
To understand what the event cache is we must first understand how the Event Server as a whole works. The following diagram describes the flow of events through the various components of the Event Server.

As you can see when an event leaves the reception engine, the rules engine takes over. Any event that is processed by the rules engine, and not dropped is placed into memory - into the Event Cache. The rules engine then passes the event to the dispatch engine which places it in the Event Repository and fires it to any open consoles.
The purpose of the event cache is to hold recent events, so that the rule engine when called upon can correlate new events with existing events.
When the Event Server starts it loads events from the Event Repository based on some configurable time and size parameters (see Parameters below). This is the last time events are taken from the Repository and put into the Event Cache.
After the initial load all new events that aren't dropped by the rules engine are cached whether they are in an OPEN, ACK or CLOSED state. These events are written to the cache by the rules engine itself.
The event cache is used only by the rules engine for use within rules processing. Contrary to popular belief the Event Consoles do not get there events from the Event Cache, rather Consoles are populated by the dispatch engine which gets the events from either the Event Repository (during startup) or from the rules engine.
The event cache determines what to load and what to remove (from the cache only) by way of three Event Server parameters. These can be set either by the GUI (Event Server - Parameters) or from the CLI wsetesvrcfg (and viewed by wlsesvrcfg). The three parameters are as follows:
When we look at performance of the Event Server we need to look at what exactly uses the Event Cache. The four main rules templates that use the cache are:-
These templates essentially search the event cache for specific events, in the case of the 'all' templates the whole cache is searched sequentially, with the 'first' templates, the rules engine stops searching the cache when it finds the first match.
There are really two main performance issues to consider. Size and use of rules.
The biggest consideration is the size of the cache. How big should you make it? This is a difficult question to answer. It really depends upon your business requirements. How far back in time do you need to perform event correlation - unfortunately only your organisation can answer that question.
What is the maximum size of the event cache? Well as yet I've not found a concrete answer to this, however in my experience I have found that anything beyond 2,500 events in the cache even on the most powerful servers, the rule processing becomes so slow that the whole Event Server grinds to a halt.
A secondary consideration is the use of the all and first templates. Searching through the whole cache is obviously less efficient than looking for just the first matching event, therefore performance is impacted using the all templates.
At the end of the day the size of the cache is always going to be a trade off between performance and business requirements, a small cache will perform better than a large cache - but will it meet your requirements of correlation.
There are only three methods of removing events from the cache.
The command wtdbclear does not (even with the -f option) remove any events from the Event Cache.