Implement FIFO and LRU caches through a Map memory limit

Đang mở
#1,095 8 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
backend

Hướng nghiên cứu

Start with the Concurrent::Map entry point and review the issue discussion for a decision on scope. Clarify whether max_bytesize should support FIFO, LRU, or both, and define how size and access behavior are measured before implementation; the issue does not yet specify complete done criteria.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I would like to allow a max_bytesize to be set for a Concurrent::Map, which would stop the combination of the map and its entries from getting any bigger by automatically deleting entries when a new one is added. Deletion of the oldest entry is easy through Hash#shift. New entries would automatically make a FIFO cache, while an LRU cache would need each accessed entry to be deleted and re-added.

Is this something worth working up a PR for? If so, does anyone have any suggestions on what to do and what not to do?

Ngôn ngữ chính
Ruby
Star
5.8k
Fork
420
Merge trung bình
20 giờ 45 phút
Pull request đã merge (30 ngày)
4

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ruby-concurrency/concurrent-ruby

Tất cả issue của ruby-concurrency/concurrent-ruby

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.