Why and when to perform this task
Cacheable commands are stored in the cache for reuse with a similar mechanism for servlets and JavaServer Pages (JSP) files. However, in this case, the unique cache IDs are generated based on methods and fields present in the command as input parameters. For example, a GetStockQuote command can have a symbol as its input parameter.A unique cache ID can generate from the name of the command, plus the value of the symbol.
To use command caching you must:
Step for this task
You must define the interface that extends one or more of the interfaces in the command package. The command package consists of three interfaces:
... import com.ibm.websphere.command.*; public interface MyCommand extends TargetableCommand { // Declare application methods here }
You can also override the default implementations of other methods provided in the CacheableCommandImpl class.