Network Deployment (Distributed operating systems), v8.0 > Reference > Commands (wsadmin scripting)
DynamicCache command group
We can use Jython to manage the dynamic cache service. Use the commands in the DynamicCache command group to create object and service cache instances with wsadmin.sh.
Use the following commands to manage your dynamic cache configuration:
createObjectCacheInstance
The createObjectCacheInstance command creates an object cache instance in the configuration. An object cache is a location where the dynamic cache stores, distributes, and shares data.
Target object
Specify the instance of the cache provider that the system stores the object cache instance objects under.
Required parameters
-name
Name of the object cache instance to create. (String, required)
-jndiName
JNDI name for the object cache instance to create. (String, required)
Return valueThe command does not return output.
Batch mode example usage
- Jython string:
AdminTask.createObjectCacheInstance('CacheProvider(cells/myCell/nodes/myNode/servers/myServer|resources-pme502.xml# #CacheProvider_1055745612404)','[-name objectName -jndiName myJNDI]')
- Use Jython list:
AdminTask.createObjectCacheInstance('CacheProvider(cells/myCell/nodes/myNode/servers/myServer|resources-pme502.xml# #CacheProvider_1055745612404)',['-name', 'objectName', '-jndiName', 'myJNDI'])
Interactive example...
### Jython
AdminTask.createObjectCacheInstance('-interactive')
createServletCacheInstance
The createServletCacheInstance command creates a servlet cache instance in the configuration. A servlet cache instance specifies the location where the dynamic cache stores, distributes, and shares data.
Target object
Specify the instance of the cache provider that the system stores the object cache instance objects under.
Required parameters
-name
Name of the servlet cache instance to create. (String, required)
-jndiName
JNDI name for the servlet cache instance to create. (String, required)
Return valueThe command does not return output.
Batch mode example usage
- Jython string:
AdminTask.createServletCacheInstance('CacheProvider(cells/myCell/nodes/myNode/servers/myServer|resources-pme502.xml l#CacheProvider_1055745612404)','[-name servletName -jndiName myJNDI]')
- Use Jython list:
AdminTask.createServletCacheInstance('CacheProvider(cells/myCell/nodes/myNode/servers/myServer|resources-pme502.xml l#CacheProvider_1055745612404)',['-name', 'servletName', '-jndiName', 'myJNDI'])
Interactive example...
### Jython
AdminTask.createServletCacheInstance('-interactive')
Use the DistributedMap and DistributedObjectCache interfaces for the dynamic cache
Use object cache instances
Related
Servlet cache instance settings
Object cache instance settings