[Vol-dev] Issues with using the cache

Carl Pulley c.pulley at acme-labs.org.uk
Sat Apr 6 09:39:18 CDT 2013

 I'm currently attempting to get caching working with some library code that exists outside a plugin. The code is parsing debugging symbol tables and so some caching would be useful for performance purposes.

The use of caching is normally controlled at the command line via the --cache option. Within running library code, I'm using the following pattern to detect if the --cache option was specified:

 import volatility.conf as conf

 class Library(object):
   def __init__(self, *args, **kwargs):
     config = conf.ConfObject() # singleton object
     if config.CACHE:
       print "cache enabled"
       print "cache disabled"

BTW, I'm aware that one can use the --debug option to see if caching is enabled at the terminal.

If one now places this code within the volatility directory and then calls it via a plugin - for example with say:

 import volatility.plugins.common as common
 from volatility.library import Library

 class TestPlugin(common.AbstractWindowsCommand):
   def __init__(self, *args, **kwargs):
     common.AbstractWindowsCommand.__init__(self, *args, **kwargs)
     lib = Library()

and now if we run the plugin, I consistently observe that the --cache option is reported as disabled.

I've tried triggering cache enabling via a callback to cache.enable_caching with no joy.

Any help is greatly appreciated.

Many thanks,


More information about the Vol-dev mailing list