pymel.core.system.diskCache

diskCache(*args, **kwargs)

Command to create, clear, or close disk cache(s). In query mode, return type is based on queried flag.

Flags:

Long Name / Short Name Argument Types Properties
append / a bool ../../../_images/create.gif ../../../_images/query.gif
  Append at the end and not to flush the existing cache
cacheType / ct unicode ../../../_images/create.gif ../../../_images/query.gif
  Specifies the type of cache to overwrite. mcfpfor particle playback cache, mcfifor particle initial cache. mcjfor jiggle cache. This option is only activated during the cache creation.
close / c unicode ../../../_images/create.gif ../../../_images/query.gif
  Close the cache given the disk cache node name. If -eco/enabledCachesOnly is trueonly enabled disk cache nodes are affected.
closeAll / ca bool ../../../_images/create.gif ../../../_images/query.gif
  Close all disk cache files. If -eco/enabledCachesOnly is trueonly enabled disk cache nodes are affected.
delete / d unicode ../../../_images/create.gif ../../../_images/query.gif
  Delete the cache given the disk cache node name. If -eco/enabledCachesOnly is trueonly enabled disk cache nodes are affected.
deleteAll / da bool ../../../_images/create.gif ../../../_images/query.gif
  Delete all disk cache files. If -eco/enabledCachesOnly is trueonly enabled disk cache nodes are affected.
empty / e unicode ../../../_images/create.gif ../../../_images/query.gif
  Clear the content of the disk cache with the given disk cache node name. If -eco/enabledCachesOnly is trueonly enabled disk cache nodes are affected.
emptyAll / ea bool ../../../_images/create.gif ../../../_images/query.gif
  Clear the content of all disk caches. If -eco/enabledCachesOnly is trueonly enabled disk cache nodes are affected.
enabledCachesOnly / eco bool ../../../_images/create.gif ../../../_images/query.gif
  When present, this flag restricts the -ea/emptyAll, so that only enableddisk caches (i.e., disk cache nodes with the .enableattribute set to true) are affected.
endTime / et time ../../../_images/create.gif ../../../_images/query.gif
  Specifies the end frame of the cache range.
frameRangeType / frt unicode ../../../_images/create.gif ../../../_images/query.gif
  Specifies the type of frame range to use, namely Render Globals, Time Slider, and Start/End. In the case of Time Slider, startFrame and endFrame need to be specified. (This flag is now obsolete. Please use the -startTime and -endTime flags to specify the frame range explicitly.)
overSample / os bool ../../../_images/create.gif ../../../_images/query.gif
  Over sample if true. Otherwise, under sample.
samplingRate / sr int ../../../_images/create.gif ../../../_images/query.gif
  Specifies how frequently to sample relative to each frame. When over-sampling (-overSample has been specified), this parameter determines how many times per frame the runup will be evaluated. When under-sampling (the default, when -overSample has not been specified), the runup will evaluate only once per srframes, where sris the value specified to this flag.
startTime / st time ../../../_images/create.gif ../../../_images/query.gif
  Specifies the start frame of the cache range.
tempDir / tmp bool ../../../_images/create.gif ../../../_images/query.gif
  Query-only flag for the location of temporary diskCache files. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.diskCache

Example:

import pymel.core as pm

# Explicitly specify the settings for disk cache
# creation: the start time to 3 and the end time to 10.
pm.diskCache( startTime=3, endTime=10 )
# Specify to use over sampling and with sampling
# rate set to 2, sampling twice for each frame.
pm.diskCache( overSample=True, samplingRate=2 )
# Delete all caches
pm.diskCache( deleteAll=True )
# Clear the cache content for diskCache3's cache.
pm.diskCache( empty='diskCache3' )
# Close all the disk caches.
pm.diskCache( emptyAll=True )