#Stefan Galleithner 20101229
import nuke
import nukescripts as ns

def clearAllCaches():
  for n in nuke.allNodes():
    if n.Class() == "Read":
      n.knob('reload').execute()
  crrframe = nuke.frame()
  nuke.clearDiskCache()
  nuke.frame(crrframe)
  nuke.updateUI()
  #print (ns.cache_report(""))
  ns.cache_clear("")