{"id":19793559,"url":"https://github.com/darky/glemo","last_synced_at":"2026-03-05T06:02:24.055Z","repository":{"id":240262004,"uuid":"802152557","full_name":"darky/glemo","owner":"darky","description":"Simple function memoization over Erlang ETS / JavaScript Map for Gleam","archived":false,"fork":false,"pushed_at":"2024-09-19T16:26:25.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-01T13:45:03.491Z","etag":null,"topics":["gleam","memoize"],"latest_commit_sha":null,"homepage":"","language":"Gleam","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/darky.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,"publiccode":null,"codemeta":null}},"created_at":"2024-05-17T16:08:46.000Z","updated_at":"2024-12-30T14:29:41.000Z","dependencies_parsed_at":"2024-06-17T19:34:27.928Z","dependency_job_id":"e45c8db4-54f9-485a-8a43-d82195bc5d20","html_url":"https://github.com/darky/glemo","commit_stats":null,"previous_names":["darky/glemo"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/darky/glemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darky%2Fglemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darky%2Fglemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darky%2Fglemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darky%2Fglemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darky","download_url":"https://codeload.github.com/darky/glemo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darky%2Fglemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30111779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gleam","memoize"],"created_at":"2024-11-12T07:10:20.695Z","updated_at":"2026-03-05T06:02:24.029Z","avatar_url":"https://github.com/darky.png","language":"Gleam","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glemo\n\n[![Package Version](https://img.shields.io/hexpm/v/glemo)](https://hex.pm/packages/glemo)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/glemo/)\n![Erlang-compatible](https://img.shields.io/badge/target-erlang-a2003e)\n![JavaScript-compatible](https://img.shields.io/badge/target-javascript-f1e05a)\n\nSimple function memoization over Erlang ETS / JavaScript Map for Gleam\n\n```sh\ngleam add glemo\n```\n```gleam\nimport glemo\n\npub fn main() {\n  // init caches on application startup\n  glemo.init([\"my_cache\"])\n\n  // try get from cache\n  // on first attempt item not exists in cache\n  // fallback function will be called\n  // result of fallback function will be placed to cache, function argument is used as key\n  1\n  |\u003e glemo.memo(\"my_cache\", fn(x) { x + 1 }) // 2\n\n  // now value returned from cache, fallback function ignored\n  1\n  |\u003e glemo.memo(\"my_cache\", fn(x) { x + 1 }) // 2\n\n  // invalidate cache item by specific key\n  glemo.invalidate_specific(1, \"my_cache\")\n\n  // invalidate all cache\n  glemo.invalidate_all(\"my_cache\")\n}\n```\n\nFurther documentation can be found at \u003chttps://hexdocs.pm/glemo\u003e.\n\n## Development\n\n```sh\ngleam run   # Run the project\ngleam test  # Run the tests\ngleam shell # Run an Erlang shell\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarky%2Fglemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarky%2Fglemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarky%2Fglemo/lists"}