{"id":22912181,"url":"https://github.com/simplyyan/oyzem","last_synced_at":"2025-04-01T11:16:19.633Z","repository":{"id":219943639,"uuid":"750335965","full_name":"simplyYan/oyzem","owner":"simplyYan","description":"memoizing has never been easier","archived":false,"fork":false,"pushed_at":"2024-08-27T18:03:27.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T06:22:48.522Z","etag":null,"topics":["framework","go","go-framework","go-lib","go-library","go-package","golang","memoization","memoization-library","memoize","memoize-decorator","perfomance"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplyYan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://github.com/simplyYan/oyzem/blob/main/DONATE.MD"]}},"created_at":"2024-01-30T13:01:17.000Z","updated_at":"2024-08-27T18:03:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b30839e-e753-4133-94d7-046896f29dd1","html_url":"https://github.com/simplyYan/oyzem","commit_stats":null,"previous_names":["simplyyan/oyzem"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyYan%2Foyzem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyYan%2Foyzem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyYan%2Foyzem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyYan%2Foyzem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplyYan","download_url":"https://codeload.github.com/simplyYan/oyzem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246628225,"owners_count":20808106,"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":["framework","go","go-framework","go-lib","go-library","go-package","golang","memoization","memoization-library","memoize","memoize-decorator","perfomance"],"created_at":"2024-12-14T04:27:03.877Z","updated_at":"2025-04-01T11:16:19.608Z","avatar_url":"https://github.com/simplyYan.png","language":"Go","funding_links":["https://github.com/simplyYan/oyzem/blob/main/DONATE.MD"],"categories":[],"sub_categories":[],"readme":"===========================================\noyzem - Simple Memoization Library for Go\n===========================================\n\n[![License](https://img.shields.io/badge/License-BSD--3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![Open Source](https://img.shields.io/badge/Open%20Source-Yes-green.svg)](https://opensource.org/)\n\n## How to Install\n\nInstall `oyzem` using `go get`:\n\n```bash\ngo get -u github.com/simplyYan/oyzem\n```\n## Introduction\n\noyzem is a lightweight and easy-to-use Go library for memoization, providing a simple mechanism to cache function results and improve performance.\nFeatures\n\n- Easy: Simple API for memoizing functions.\n- Fast: Efficient caching using a mutex for thread safety.\n- Lightweight: Minimalistic design with a focus on simplicity.\n- Objective: Aims to provide a clear and straightforward memoization solution.\n\n## License\n\noyzem is distributed under the BSD-3-Clause License. See the LICENSE file for details.\n\n## Examples\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/simplyYan/oyzem\"\n)\n\nfunc main() {\n    // Create a new Memoizer instance\n    memoizer := oyzem.New()\n\n    // Memoize a function\n    memoizedFn, _ := memoizer.Memoize(func(a, b int) int {\n        fmt.Println(\"Performing calculation...\")\n        return a + b\n    })\n\n    // Run the memoized function\n    result, _ := memoizer.Run(memoizedFn, 2, 3)\n    fmt.Println(\"Result:\", result)\n}\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/simplyYan/oyzem\"\n)\n\nfunc main() {\n\t// Create a new Memoizer instance\n\tmemoizer := oyzem.New()\n\n\t// Memoize a function\n\tmemoizedFn, _ := memoizer.Memoize(func(a, b int) int {\n\t\tfmt.Println(\"Performing calculation...\")\n\t\treturn a + b\n\t})\n\n\t// Run the memoized function\n\tresult1, _ := memoizer.Run(memoizedFn, 2, 3)\n\tfmt.Println(\"Result 1:\", result1)\n\n\t// Run the memoized function again (result obtained from the cache)\n\tresult2, _ := memoizer.Run(memoizedFn, 2, 3)\n\tfmt.Println(\"Result 2 (from cache):\", result2)\n\n\t// Run the memoized function with different arguments\n\tresult3, _ := memoizer.Run(memoizedFn, 4, 5)\n\tfmt.Println(\"Result 3:\", result3)\n}\n\n```\n## How to Contribute\n\nContributions to oyzem are welcome! If you want to add, fix, or improve features, follow these steps:\n\n1. Fork the repository on GitHub.\n2. Clone your forked repository: git clone https://github.com/your-username/oyzem.git.\n3. Create a new branch: git checkout -b feature-name.\n4. Make your changes and commit: git commit -m \"Description of changes\".\n5. Push your branch to GitHub: git push origin feature-name.\n6. Open a pull request on the official oyzem repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplyyan%2Foyzem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplyyan%2Foyzem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplyyan%2Foyzem/lists"}