{"id":17246902,"url":"https://github.com/i-redbyte/ring-map","last_synced_at":"2025-03-26T05:25:58.381Z","repository":{"id":159510406,"uuid":"248620532","full_name":"i-redbyte/ring-map","owner":"i-redbyte","description":"The simplest ring map ","archived":false,"fork":false,"pushed_at":"2022-04-26T21:55:15.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-31T07:15:15.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/i-redbyte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-03-19T22:50:51.000Z","updated_at":"2024-02-24T22:45:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"8a0609fd-d3b2-43ee-9e8a-f094f137fd84","html_url":"https://github.com/i-redbyte/ring-map","commit_stats":null,"previous_names":["ilya-sokolov/ring-map"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-redbyte%2Fring-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-redbyte%2Fring-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-redbyte%2Fring-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-redbyte%2Fring-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i-redbyte","download_url":"https://codeload.github.com/i-redbyte/ring-map/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245594115,"owners_count":20641198,"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","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":[],"created_at":"2024-10-15T06:35:24.872Z","updated_at":"2025-03-26T05:25:58.358Z","avatar_url":"https://github.com/i-redbyte.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"**An example of a solution to a problem:**\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n)\n\n// Vault structure stores limited number of key-value elements.\n// It stores most recently addressed elements, so if it already stores maximum elements allowed,\n// when we add next one, it should delete least recently used one (either by Get or Put).\n// type Vault struct {\n// ...\n// }\n\nfunc main() {\n\tv := NewVault(3) // Create vault to store 3 key-value elements (string: string)\n\n\tv.Put(\"key1\", \"value1\") // Add \"key1\": \"value1\"\n\tfmt.Println(v.Len())    // 1\n\n\tv.Put(\"key2\", \"value2\") // Add \"key2\": \"value2\"\n\tfmt.Println(v.Len())    // 2\n\n\tv.Put(\"key3\", \"value3\") // Add \"key3\": \"value3\"\n\tfmt.Println(v.Len())    // 3\n\n\tfmt.Println(v.Get(\"key1\")) // value1\n\n\tv.Put(\"key4\", \"value4\") // Add \"key4\": \"value4\" and remove \"key2\" as least recently used one\n\tfmt.Println(v.Len())    // 3\n\n\tfmt.Println(v.Keys()) // [key1 key4 key3] // keys order doesn't matter here\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-redbyte%2Fring-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi-redbyte%2Fring-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-redbyte%2Fring-map/lists"}