The Volatility Framework
volatility.cache.Invalidator Class Reference

The Invalidator encapsulates program state to control invalidation of the cache. More...

Inheritance diagram for volatility.cache.Invalidator:

Public Member Functions

def __init__ (self)
 
def add_condition (self, key, callback)
 Callback will be stored under key and should return a string.
 
def __setstate__ (self, state)
 
def __getstate__ (self)
 When pickling ourselves we call our callbacks to provide a dict of strings (our state signature). More...
 

Public Attributes

 callbacks
 

Detailed Description

The Invalidator encapsulates program state to control invalidation of the cache.

1) This object registers callbacks using the add_condition() method.

2) Prior to serialising the cache object the callbacks are called returning a signature dict.

3) When unpickling the cached object, we call the invalidator to produce a signature dict again, and compare this to the pickled version.

The purpose of the callbacks is to represent a signature of the current state of execution. If the signature changes, the cache is invalidated.

Member Function Documentation

def volatility.cache.Invalidator.__getstate__ (   self)

When pickling ourselves we call our callbacks to provide a dict of strings (our state signature).

This dict should reflect all of our running state at the moment. This will then be compared to the state signature when unpickling and if its different we invalidate the cache.


The documentation for this class was generated from the following file: