Feature/disable caching
This feature adds support for (very early) deciding as to whether caching of layer reads should be enabled throughout the codebase. It's not ideal because the main toggle doesn't live in volatility.frameworks.constants like it should, because volatility.framework imports other parts of the framework that already need to know whether the caching is enabled or not. To avoid this issue, the toggle lives just in volatility.
What if we tried something more localized to caching, like this?
https://github.com/volatilityfoundation/volatility3/tree/feature/disable-caching-try2
That won't trip in time (and you can add an exception in to show that changing the flag would have no effect). The wrapping and therefore that if statement are evaluated as the files are imported. By the time you've reached there, they're all wrapped already. You'd need to write your own lru_cache method which would check whether to use the cache or not each time if you wanted to be changable dynamically.
Another option may be to do through and explicitly unwrap all wrapped objects (or maybe set their cache size to 0?), but that would be monkeying deep inside of python and probably make it difficult to distinguish if there were some values we wanted cached and others we didn't...
We can discuss it today. The exception trips for me, so I am missing something.
Yeah, no problem. Adding the exception in after the if statement in disable-caching-try2, I get the exception whether I'm using --live or not, meaning the flag isn't getting interpreted before the wrapper's being called (and the caching is always being applied), but I'm happy to go through it at the meeting. 5:)
Following a discussion, we've considered that performance (particularly for the common case) is important, but this approach is a bit complex/ugly so we're going to defer making this change for a bit.