Skip to content

dogpile.cache.memory is curiously destructive of its inputs #273

@0xDEC0DE

Description

@0xDEC0DE

Steps to reproduce

from dogpile.cache import make_region

dpc_args = dict(cache_dict=dict(cache='warm'))
print(f"Before: {dpc_args}")
make_region().configure('dogpile.cache.memory', arguments=dpc_args)
print(f"After: {dpc_args}")

Expected result

Before and After output is identical.

Actual behavior

The arguments to the configure method get eaten:

Before: {'cache_dict': {'cache': 'warm'}}
After: {}

Miscellany

Only the MemoryBackend and its derived classes seem to do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions