{"id":15056411,"url":"https://github.com/lpgauth/foil","last_synced_at":"2025-04-10T04:10:27.419Z","repository":{"id":55441520,"uuid":"96550113","full_name":"lpgauth/foil","owner":"lpgauth","description":"High-Performance Erlang Cache Compiler","archived":false,"fork":false,"pushed_at":"2024-02-21T15:37:03.000Z","size":1179,"stargazers_count":31,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T05:26:05.163Z","etag":null,"topics":["cache","compiler","erlang","high-performance"],"latest_commit_sha":null,"homepage":"","language":"Erlang","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/lpgauth.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-07-07T15:08:42.000Z","updated_at":"2023-01-30T03:02:52.000Z","dependencies_parsed_at":"2025-02-16T13:43:08.025Z","dependency_job_id":"fabf8a7f-fc5a-4289-991e-8da1d31eb3fe","html_url":"https://github.com/lpgauth/foil","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":"0.30000000000000004","last_synced_commit":"e462829855a745d8f20fb0508ae3eb8e323b03bd"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgauth%2Ffoil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgauth%2Ffoil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgauth%2Ffoil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgauth%2Ffoil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpgauth","download_url":"https://codeload.github.com/lpgauth/foil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154986,"owners_count":21056543,"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":["cache","compiler","erlang","high-performance"],"created_at":"2024-09-24T21:50:59.183Z","updated_at":"2025-04-10T04:10:27.393Z","avatar_url":"https://github.com/lpgauth.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# foil\n\nHigh-Performance Erlang Cache Compiler\n\n[![Build Status](https://travis-ci.org/lpgauth/foil.svg?branch=master)](https://travis-ci.org/lpgauth/foil)\n[![Coverage Status](https://coveralls.io/repos/github/lpgauth/foil/badge.svg?branch=master)](https://coveralls.io/github/lpgauth/foil?branch=master)\n\n## About\n\nFoil is a cache that compiles key-values into Erlang modules. Key-values can be namespaced and are backed by an ETS table for easy re-compilation.\n\n## API\n\n\u003ca href=\"https://github.com/lpgauth/foil/blob/master/doc/foil.md#index\" class=\"module\"\u003eFunction Index\u003c/a\u003e\n\n## Benchmarks\n\n```\nmake bench\nRunning bin/bench.sh...\n===\u003e Verifying dependencies...\n===\u003e Compiling foil\n                   name   mean    p99   p999\n               ets_atom  0.311  0.374  0.685\n     foil_indirect_atom  0.190  0.320  1.940\n       foil_direct_atom  0.085  0.106  0.280\n             ets_binary  0.489  0.617  0.866\n   foil_indirect_binary  0.253  0.311  0.749\n     foil_direct_binary  0.135  0.209  0.637\n            ets_complex  0.646  0.839  1.190\n  foil_indirect_complex  0.276  0.295  0.542\n    foil_direct_complex  0.166  0.196  0.451\n               ets_list  0.427  0.544  0.823\n     foil_indirect_list  0.253  1.730  2.000\n       foil_direct_list  0.109  0.129  0.305\n              ets_tuple  0.427  0.660  0.965\n    foil_indirect_tuple  0.206  0.289  2.030\n      foil_direct_tuple  0.115  0.139  0.314\n```\n\n## Examples\n\n```erlang\n1\u003e foil_app:start().\n{ok, [metal, foil]}\n\n2\u003e foil:new(test).\nok\n\n3\u003e foil:insert(test, key, value).\nok\n\n4\u003e foil:insert(test, key2, \u003c\u003c\"foo\"\u003e\u003e).\nok\n\n5\u003e foil:load(test).\nok\n\n6\u003e test_foil:lookup(key).\n{ok, value}\n\n7\u003e foil:lookup(test, key2).\n{ok, \u003c\u003c\"foo\"\u003e\u003e}\n\n8\u003e foil:lookup(test, key3).\n{error, key_not_found}\n```\n\n## Tests\n\n```makefile\nmake dialyzer\nmake elvis\nmake eunit\nmake xref\n```\n## License\n```license\nThe MIT License (MIT)\n\nCopyright (c) 2017 Louis-Philippe Gauthier\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpgauth%2Ffoil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpgauth%2Ffoil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpgauth%2Ffoil/lists"}