mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-28 18:59:44 +02:00
Merge pull request #1768 from volatilityfoundation/extensions/process_layer_caching
Extensions: Add cache decorators as appropriate
This commit is contained in:
@@ -471,6 +471,7 @@ class task_struct(generic.GenericIntelProcess):
|
||||
|
||||
return True
|
||||
|
||||
@functools.lru_cache
|
||||
def add_process_layer(
|
||||
self, config_prefix: Optional[str] = None, preferred_name: Optional[str] = None
|
||||
) -> Optional[str]:
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
|
||||
#
|
||||
import contextlib
|
||||
import functools
|
||||
import logging
|
||||
from typing import Generator, Iterable, Optional, Set, Tuple
|
||||
|
||||
@@ -17,6 +18,7 @@ class proc(generic.GenericIntelProcess):
|
||||
def get_task(self):
|
||||
return self.task.dereference().cast("task")
|
||||
|
||||
@functools.lru_cache
|
||||
def add_process_layer(
|
||||
self, config_prefix: Optional[str] = None, preferred_name: Optional[str] = None
|
||||
) -> Optional[str]:
|
||||
|
||||
@@ -740,9 +740,10 @@ class EPROCESS(generic.GenericIntelProcess, pool.ExecutiveObject):
|
||||
|
||||
return True
|
||||
|
||||
@functools.lru_cache
|
||||
def add_process_layer(
|
||||
self, config_prefix: Optional[str] = None, preferred_name: Optional[str] = None
|
||||
):
|
||||
) -> str:
|
||||
"""Constructs a new layer based on the process's DirectoryTableBase."""
|
||||
|
||||
parent_layer = self._context.layers[self.vol.layer_name]
|
||||
|
||||
Reference in New Issue
Block a user