Cacheable commands are stored in the cache for reuse with a similar mechanism for servlets and JavaServer Pages files.
A unique cache ID can generate from the name of the command, plus the value of the symbol.
To use command caching :
You must define the interface that extends one or more of the interfaces in the command package. The command package consists of three interfaces:
In practice, most commands implement the TargetableCommand interface, which allows the command to run remotely. The code structure of a command interface for a targetable command follows:
... 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.