{"id":15546127,"url":"https://github.com/vasuadari/nebulex_memcached_adapter","last_synced_at":"2025-04-11T12:43:55.469Z","repository":{"id":62430014,"uuid":"173498284","full_name":"vasuadari/nebulex_memcached_adapter","owner":"vasuadari","description":"Nebulex adapter for memcached","archived":false,"fork":false,"pushed_at":"2019-09-23T19:29:34.000Z","size":31,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-09T13:03:41.072Z","etag":null,"topics":["cache","distributed","elixir","memcached","nebulex"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/vasuadari.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}},"created_at":"2019-03-02T20:58:54.000Z","updated_at":"2023-03-04T09:00:59.000Z","dependencies_parsed_at":"2022-11-01T20:05:19.650Z","dependency_job_id":null,"html_url":"https://github.com/vasuadari/nebulex_memcached_adapter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasuadari%2Fnebulex_memcached_adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasuadari%2Fnebulex_memcached_adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasuadari%2Fnebulex_memcached_adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasuadari%2Fnebulex_memcached_adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vasuadari","download_url":"https://codeload.github.com/vasuadari/nebulex_memcached_adapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248402541,"owners_count":21097331,"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","distributed","elixir","memcached","nebulex"],"created_at":"2024-10-02T13:00:53.413Z","updated_at":"2025-04-11T12:43:55.434Z","avatar_url":"https://github.com/vasuadari.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nebulex adapter for Memcached\n\n[![Build Status](https://circleci.com/gh/vasuadari/nebulex_memcached_adapter.svg?style=svg)](https://circleci.com/gh/vasuadari/nebulex_memcached_adapter)\n[![Coverage Status](https://coveralls.io/repos/github/vasuadari/nebulex_memcached_adapter/badge.svg?branch=task%2Fsetup_ci)](https://coveralls.io/github/vasuadari/nebulex_memcached_adapter?branch=task%2Fsetup_ci)\n\nThis adapter is implemented using [Memcachex](https://github.com/ananthakumaran/memcachex),\na Memcached driver for Elixir.\n\nThis adapter supports multiple connection pools against different Memcached nodes\nin a cluster. This feature enables resiliency and also be able to survive\nin case any node(s) gets unreachable.\n\n## Installation\n\nAdd `nebulex_memcached_adapter` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:nebulex_memcached_adapter, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Usage\n\nAfter installing, we can define our cache to use Memcached adapter as follows:\n\n```elixir\ndefmodule MyApp.MemcachedCache do\n  use Nebulex.Cache,\n    otp_app: :nebulex,\n    adapter: NebulexMemcachedAdapter\nend\n```\n\nThe rest of Memcached configuration is set in our application environment, usually\ndefined in your `config/config.exs`:\n\n```elixir\nconfig :my_app, MyApp.MemcachedCache,\n  pools: [\n    primary: [\n      host: \"127.0.0.1\",\n      port: 11211,\n      pool_size: 10\n    ],\n    #=\u003e maybe more pools\n  ]\n```\n\nSince this adapter is implemented by means of `Memcachex`, it inherits the same\noptions, including regular Memcached options and connection options as well. For\nmore information about the options, please check out `NebulexMemcachedAdapter`\nmodule and also [Memcachex](https://github.com/ananthakumaran/memcachex).\n\n## Testing\n\n### Docker\n\n```\ndocker-compose run test\n```\n\n### Without Docker\n\nEnsure you have Memcached up and running on **localhost**(default host) and\n**11211**(default port).\n\nSince `NebulexMemcachedAdapter` uses the support modules and shared tests from\nNebulex and by default its `test` folder is not included within the `hex`\ndependency, it is necessary to fetch `:nebulex` dependency directly from GtiHub.\n\nFetch deps:\n\n```\n$ MIX_ENV=test mix deps.get\n```\n\nNow we can run the tests:\n\n```\n$ mix test\n```\n\nRunning tests with coverage:\n\n```\n$ mix coveralls.html\n```\n\nYou can find the coverage report within `cover/excoveralls.html`.\n\n## Benchmarks\n\nBenchmarks were added using [benchee](https://github.com/PragTob/benchee);\nto learn more, see the [benchmarks](./benchmarks) directory.\n\nTo run the benchmarks:\n\n```\n$ mix deps.get \u0026\u0026 mix run benchmarks/benchmark.exs\n```\n\n## Contributing\n\nContributions to Nebulex are very welcome and appreciated!\n\nUse the [issue tracker](https://github.com/vasuadari/nebulex_memcached_adapter/issues)\nfor bug reports or feature requests. Open a\n[pull request](https://github.com/vasuadari/nebulex_memcached_adapter/pulls)\nwhen you are ready to contribute.\n\nWhen submitting a pull request you should not update the [CHANGELOG.md](CHANGELOG.md),\nand also make sure you test your changes thoroughly, include unit tests\nalongside new or changed code.\n\nBefore to submit a PR it is highly recommended to run:\n\n * `mix test` to run tests\n * `mix coveralls.html \u0026\u0026 open cover/excoveralls.html` to run tests and check\n   out code coverage (expected 100%).\n * `mix format \u0026\u0026 mix credo --strict` to format your code properly and find code\n   style issues\n * `mix dialyzer` to run dialyzer for type checking; might take a while on the\n   first invocation\n\n## Copyright and License\n\nCopyright (c) 2018, Vasu Adari.\n\nNebulexMemcachedAdapter source code is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasuadari%2Fnebulex_memcached_adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasuadari%2Fnebulex_memcached_adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasuadari%2Fnebulex_memcached_adapter/lists"}