Skip to content

Unable to disable the internal caches #222

Description

@franxism

Is your feature request related to a problem? Please describe.

Could you please add an option to disable the internal caches in PySnmp (or at least to clear them on request).

In my setup, I use about 30 different SNMP Manager services using PySnmp (all running simultaneously in background), and the caches use a lot of memory (it can grow to the order of GBs).

For example these caches:
engine.cache['__CommandGeneratorLcdConfigurator']['tran'] -> no known way to disable it (anyway at least it can be cleared manually).
engine.message_processing_subsystems[i]._cache -> no known way to disable it (and no public method on proto/mpmod/cache.py to clear it).
engine.security_models[i]._cache -> no known way to disable it (and no public method on proto/secmod/cache.py to clear it).

Describe the solution you'd like

Add the possibility to disable the caches (e.g. in the constructor of SnmpEngine?).

Describe alternatives you've considered

Add the possibility to clear the caches (e.g. public functions to clear the caches).

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:pysnmpPySNMP packageideaSuggestions/advice on new things, but might not be mature enough to work on.priority:lowLow priority items.triageNew issues that need to be sorted out.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions