{"id":15066370,"url":"https://github.com/arkaung/dart_lru","last_synced_at":"2026-02-05T22:32:16.186Z","repository":{"id":255447245,"uuid":"852738161","full_name":"ArkAung/dart_lru","owner":"ArkAung","description":"A simple LRU package in Dart","archived":false,"fork":false,"pushed_at":"2024-09-06T14:50:30.000Z","size":27,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T06:29:12.729Z","etag":null,"topics":["dart","data-structures"],"latest_commit_sha":null,"homepage":"https://arkaung.github.io/dart_lru/","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArkAung.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T10:37:24.000Z","updated_at":"2024-09-06T14:46:06.000Z","dependencies_parsed_at":"2024-09-06T16:57:37.976Z","dependency_job_id":null,"html_url":"https://github.com/ArkAung/dart_lru","commit_stats":null,"previous_names":["arkaung/dart_lru"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ArkAung/dart_lru","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fdart_lru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fdart_lru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fdart_lru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fdart_lru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArkAung","download_url":"https://codeload.github.com/ArkAung/dart_lru/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkAung%2Fdart_lru/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586409,"owners_count":23952172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","data-structures"],"created_at":"2024-09-25T01:06:33.201Z","updated_at":"2026-02-05T22:32:16.145Z","avatar_url":"https://github.com/ArkAung.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple LRU Cache\n\n[![Pub Version](https://img.shields.io/pub/v/simple_lru_cache)](https://pub.dev/packages/simple_lru_cache)\n[![Dart SDK Version](https://badgen.net/pub/sdk-version/simple_lru_cache)](https://pub.dev/packages/simple_lru_cache)\n[![codecov](https://codecov.io/gh/arkaung/dart_lru/branch/main/graph/badge.svg)](https://codecov.io/gh/arkaung/dart_lru)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Pub Points](https://img.shields.io/pub/points/simple_lru_cache)](https://pub.dev/packages/simple_lru_cache/score)\n\nA simple and efficient Least Recently Used (LRU) cache implementation in Dart.\n\n## Features\n\n- Fixed-size cache with LRU eviction policy\n- Generic key-value storage\n- O(1) complexity for get, put, and remove operations\n\n## Usage\n\n```dart\nimport 'package:simple_lru_cache/simple_lru_cache.dart';\n\nvoid main() {\n  final cache = LRUCache\u003cint, String\u003e(3);\n  \n  cache.put(1, 'one');\n  cache.put(2, 'two');\n  cache.put(3, 'three');\n  \n  print(cache.get(1));  // Outputs: one\n  \n  cache.put(4, 'four'); // This will evict the least recently used item (2)\n  \n  print(cache.containsKey(2)); // Outputs: false\n}\n```\n\n## Installation\n\nAdd this to your package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  simple_lru_cache: ^0.2.1\n```\n\nThen run `dart pub get`.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkaung%2Fdart_lru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farkaung%2Fdart_lru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkaung%2Fdart_lru/lists"}