Package nukescripts :: Module cache
[hide private]
[frames] | no frames]

Source Code for Module nukescripts.cache

 1  # Copyright (c) 2009 The Foundry Visionmongers Ltd.  All Rights Reserved. 
 2   
 3  import nuke 
 4   
5 -def cache_clear(args = None):
6 """ 7 Clears the buffer memory cache by calling nuke.memory("free") 8 If args are supplied they are passed to nuke.memory as well 9 eg. nuke.memory( "free", args ) 10 """ 11 if args is not None and len(args) > 0: 12 nuke.memory("free", args) 13 else: 14 nuke.memory("free")
15
16 -def cache_report(args = None):
17 """ 18 Gets info on memory by calling nuke.memory("info") 19 If args are supplied they are passed to nuke.memory as well 20 eg. nuke.memory( "info", args ) 21 """ 22 if args is not None and len(args) > 0: 23 return nuke.memory("info", args) 24 else: 25 return nuke.memory("info")
26
27 -def clearAllCaches():
28 """ 29 Clears all caches. The disk cache, viewer playback cache and memory buffers. 30 """ 31 nuke.clearDiskCache() 32 nuke.clearRAMCache() 33 nuke.clearBlinkCache() 34 cache_clear()
35