Skip to content

Either support or error when items_capacity=1 #105

Closed

Description

@dcherian

I have a silly workload where I really just wanted a cache size of 1. However this doesn't work since the shards end up having a capacity of 0. It turns out the smallest number that can work is 2. I think the library should either round up 1 to 2 or raise an error to prevent this footgun.

Activity

  1. added a commit that references this issue on Mar 9, 2026
    8809154
  2. added a commit that references this issue on Mar 11, 2026
    6cdf3fb
  3. arthurprs commented on Mar 11, 2026

    @arthurprs
    Owner

    Fixed in #106 I'll produce a new minor release with it shortly.

  4. dcherian commented on Mar 11, 2026

    @dcherian
    Author

    thank you!

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