Skip to content

DatabaseCache - Support batching in set_many #174

Description

@novucs

Code of Conduct

  • I agree to follow Django's Code of Conduct

Feature Description

DatabaseCache currently supports set_many, by iterating each item one by one and saving. This can be a slow loop when saving many items, and would benefit from bulk creation of records, overriding the default.

Problem

This will save time when saving multiple cache records. No other tangible benefit comes to mind.

Request or proposal

proposal

Additional Details

I'm happy to drop a pull request for this change, but this would be my first for this project so may make mistakes.

Implementation Suggestions

I was thinking about just overriding the existing set_cache method on the DatabaseCache cache backend, bulk creating records instead of one at a time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Idea

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions