Skip to content

Cache<K, V> drop-in replacement for Map #3568

Closed

Description

@Hixie

It would be useful to have a Cache<K, V> class that works like Map in most respects but implements memory-pressure eviction semantics. This presumably needs help from the VM.

cc @esprehn

Activity

  1. added
    c: new featureNothing broken; request for a new capability
    frameworkflutter/packages/flutter repository. See also f: labels.
    engineflutter/engine related. See also e: labels.
    on Apr 26, 2016
  2. added this to the milestone on Apr 26, 2016
  3. ScottPierce commented on Jun 12, 2016

    @ScottPierce

    Android has an LruCache that has an api that's proven flexible. On the link above, the documentation shows how to turn it into a bitmap cache that only allows a certain amount of memory to be used by overriding the sizeOf method. The create and entryRemoved methods have also proven very helpful for releasing resources when they are being removed from the cache.

    I imagine these features might also be helpful in Flutter.

  4. modified the milestones: , on Jan 7, 2020
  5. added
    P3Issues that are less important to the Flutter project
    on May 29, 2020
  6. modified the milestone: on Jun 1, 2020
  7. removed this from the milestone on Jun 16, 2020
  8. removed this from the milestone on Jul 7, 2020
  9. modified the milestone: on Jul 22, 2020
  10. removed this from the milestone on Aug 17, 2020
  11. jonahwilliams commented on Oct 8, 2024

    @jonahwilliams
    Contributor

    We're not going to add this

  12. github-actions commented on Oct 22, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Oct 22, 2024
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

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions