{"id":21192186,"url":"https://github.com/mu-semtech/mu-cache","last_synced_at":"2025-07-10T03:31:29.613Z","repository":{"id":48245178,"uuid":"60562411","full_name":"mu-semtech/mu-cache","owner":"mu-semtech","description":"Service to wrap around another microservice to cache API requests","archived":false,"fork":false,"pushed_at":"2024-05-09T17:08:29.000Z","size":87,"stargazers_count":3,"open_issues_count":4,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-01T21:45:39.583Z","etag":null,"topics":["microservice","mu-service","musemtech"],"latest_commit_sha":null,"homepage":"","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/mu-semtech.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":"2016-06-06T21:33:48.000Z","updated_at":"2024-06-13T09:37:21.000Z","dependencies_parsed_at":"2022-08-24T17:41:46.248Z","dependency_job_id":null,"html_url":"https://github.com/mu-semtech/mu-cache","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/mu-semtech/mu-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-semtech%2Fmu-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-semtech%2Fmu-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-semtech%2Fmu-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-semtech%2Fmu-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mu-semtech","download_url":"https://codeload.github.com/mu-semtech/mu-cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-semtech%2Fmu-cache/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264521174,"owners_count":23622097,"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":["microservice","mu-service","musemtech"],"created_at":"2024-11-20T19:07:53.782Z","updated_at":"2025-07-10T03:31:24.597Z","avatar_url":"https://github.com/mu-semtech.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mu-cache\n\nThe mu-cache provides a distributed caching proxy for JSONAPI like resources.  The service can be placed in front of any microservice which understand the cache’s primitives.\n\n## Motivation\nWithin the mu.semte.ch framework, all state is stored in the triplestore.  This construction provides much flexibility and allows microservices to cooperate nicely.  In some cases, we can expect the triplestore to get overloaded.  In this case, caching of requests may help.\n\nDetecting when to clear the cache on a URL-basis is near-impossible, given that the set of possible calls in a JSONAPI endpoint is non-exhaustive.  In some configurations, the set of URLs which yield a particular resource may be infinite.  Primitives for managing such a cache are needed.\n\nManaging the cache within a specific microservice is probably not wanted as the microservice would need to communicate with its peers to indicate which items are in the cache.  Eg: if we have two mu-cl-resources containers using the same image, we could load-balance between these instances.  When one of these detects an update to the model, the other would need to clear its cache also.  A microservice which tackles caching is a primitive which could be of great help in this idiomatic situation.\n\n## Installation\nTo add mu-cache to your application stack, add the following snippet to your `docker-compose.yml`\n\n```\nservices:\n  cache:\n    image: semtech/mu-cache:2.0.2\n    links:\n    - myservice:backend\n```\n\n## Supported services\n\nServices that currently support mu-cache:\n- [mu-cl-resources](https://github.com/mu-semtech/mu-cl-resources/blob/master/README.md#external-cache)\n\nThese services may need to be configured in order to enable mu-cache support. Check their README for details.\n\n## Debugging\nDebugging of cache keys is helped by following environment variables:\n\n  - `LOG_CACHE_KEYS`: Logs received cache key to a response\n  - `LOG_CLEAR_KEYS`: Logs received clear keys either as a response, or explicitly received through ./mu/delta.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu-semtech%2Fmu-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmu-semtech%2Fmu-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu-semtech%2Fmu-cache/lists"}