Skip to content

Max cache option聽#8

Description

@jwoertink

SplayTreeMap supports a maxsize option:

stm = SplayTreeMap(String, String).new
stm.maxsize = 10

I think this just limits the number of keys you can store... Part of me thinks a file size option may be better in some cases 馃 Like, don't let my cache go over 10mb.... I'm not sure how we could do that reliably, or efficiently, but I wanted to at least jot it down.

Activity

  1. jwoertink commented on Mar 12, 2026

    @jwoertink
    MemberAuthor

    Coming back to this, maybe we need 2 different max cache options. A max cache entries option. This would default to unlimited, but allow you to set some value to limit the number of items that the cache can hold.

    Then a secondary option which would be a memory based size, but maybe we just keep this issue specifically to the total number of entries. If anyone has a good idea on the memory size option, we can open a new issue to discuss.

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

    hacktoberfestValid Issue for Hacktoberfest

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions