The Image Tool maintains a local file cache store. This store is used to look up where the Java, WebLogic Server installers, and WebLogic Server patches reside in the local file system.

By default, the cache store is located in the user’s $HOME/cache directory. Under this directory, the lookup information is stored in the .metadata file. All automatically downloaded patches also reside in this directory.

You can change the default cache store location by setting the environment variable WLSIMG_CACHEDIR:

$ export WLSIMG_CACHEDIR="/path/to/cachedir"

You use the cache command to manipulate the local file cache. There are several subcommands for the cache feature.

Usage: imagetool cache [OPTIONS]
List and set cache options
Option Description
listItems List cache contents.
addInstaller Add an installer to the cache.
addPatch Add a patch to the cache.
addEntry Add a cache entry. Use with caution.
help Display help information for the specified command.

Usage scenarios

  • listItems: Display the contents of the cache. Displays key value pairs of the installers and patches.

    imagetool cache listItems
    Cache contents
  • addInstaller: Add an installer to the cache, for example, JDK.

    $ imagetool cache addInstaller --type jdk --version 8u202 --path /path/to/local/jdk.tar.gz
  • addPatch: Add a patch to the cache.

    $ imagetool cache addPatch --patchId 12345678_12. --path /path/to/

    Note: When adding a patch to the cache store, the patchId should be in the following format: 99999999_9. The first 8 digits is the patch ID, followed by an underscore, and then the release number to identify the patch between different patch versions.

    For example, patch 29135930 has several different versions in Oracle Support, one for each release or PSU in which the bug is fixed.

Patch Name Release

If you downloaded the release version of the patch, then you should use the argument --patchId 29135930_12.

  • addEntry: Consider this an expert mode where you can add key value pairs to the cache without any validation.

    $ imagetool cache addEntry --key xyz_123 --value /path/to/file
  • deleteEntry: Delete an entry from the cache for a given key. Note: This command does not delete files from the disk.

    $ imagetool cache deleteEntry --key xyz_123