Skip to content

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

Closed

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.

Activity

  1. 0xDEC0DE commented on Aug 24, 2025

    @0xDEC0DE
    ContributorAuthor

    This looks like it will get addressed by #270 or #275, whichever one lands.

  2. sqla-tester commented on Aug 30, 2025

    @sqla-tester
    Collaborator

    Nicolas Simonds has proposed a fix for this issue in the main branch:

    fix: make dogpile.cache.memory preserve its init parameters https://gerrit.sqlalchemy.org/c/sqlalchemy/dogpile.cache/+/6084

  3. added a commit that references this issue on Sep 5, 2025
    34818c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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