{"id":15047870,"url":"https://github.com/dev0x13/mccache","last_synced_at":"2026-02-11T00:40:15.753Z","repository":{"id":75080256,"uuid":"261395728","full_name":"dev0x13/mccache","owner":"dev0x13","description":"A reference implementation for time-homogeneous Markov chain based cache","archived":false,"fork":false,"pushed_at":"2023-04-22T09:17:31.000Z","size":637,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-07T20:52:27.417Z","etag":null,"topics":["cache","cache-simulator","cplusplus-11","cpp11","markov-chain"],"latest_commit_sha":null,"homepage":"","language":"C++","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/dev0x13.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":"2020-05-05T08:04:23.000Z","updated_at":"2022-09-09T17:13:33.000Z","dependencies_parsed_at":"2023-07-10T18:45:56.158Z","dependency_job_id":null,"html_url":"https://github.com/dev0x13/mccache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dev0x13/mccache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0x13%2Fmccache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0x13%2Fmccache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0x13%2Fmccache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0x13%2Fmccache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev0x13","download_url":"https://codeload.github.com/dev0x13/mccache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0x13%2Fmccache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272260627,"owners_count":24902391,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cache","cache-simulator","cplusplus-11","cpp11","markov-chain"],"created_at":"2024-09-24T21:05:24.243Z","updated_at":"2026-02-11T00:40:10.708Z","avatar_url":"https://github.com/dev0x13.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markov chain cache\n\nThis repository contains a reference implementation for time-homogeneous Markov chain based cache,\nwhich was created as a part of my master degree dissertation.\n\nAlgorithm description is available in Russian language as a part of the [dissertation](https://elib.spbstu.ru/dl/3/2020/vr/vr20-1357.pdf/info) (pp. 60-68). If the document is not available, please contact me in order to receive a copy.\n\n## Software specific notes\n\n* This implementation is not intended to be efficient enough for production usage. Its purpose is to\n  set up experiments with a decent balance between code readability and performance, and to be an extension\n  for the algorithm description from the programming point of view.\n* This implementation basically does not provided error handling and reporting. All the expected preconditions\n  are represented by asserts. \n* Since this implementation employs several linear algebra routines, it will try to use Intel MKL by default,\n  which should be installed to the host system. If MKL is not installed, then naive BLAS implementation is used\n  (this is not preferred since these routines are really slow comparing to any BLAS library).\n  However, you may use any BLAS library of you choice since the code, which utilizes these routines, is isolated\n  to `src/math/linalg_impl.cpp`.\n\n## Building\n\nCMake 3.15 is required for building as there is apparently a bug in FindBLAS module in the earlier CMake versions,\nwhich makes Intel MKL usage very problematic.\n\nThe build was tested on Ubuntu 16.04 GCC 5.5.0, no guarantees are given regarding to other environments\n(especially Windows).\n\n## Testing\n\nThis repository provides two options to evaluate the algorithm. These options refer to the two different caching system purposes:\n* Static, when all the items are not cached at the beginning and the items set is determined, i.e. no new items \n  can be stored at the runtime.\n* Dynamic, when the storage system contains no items at the beginning and reading operations (retrieving existing items)\n  are combined with writing operations (storing new items) at the runtime.\n  \nThis algorithm was implemented for the dynamic scenario, however preliminary testing results show that it can be\nsuccessfully employed for both scenarios.\n\nThere are two utilities provided for evaluating these scenarios:\n* `mccache_evaluation_test_static` for static scenario. Usage example is the following:\n```bash\n./mccache_evaluation_test_static ../sample_traces/static/1999-011-usertrace-98-webcachesim.tr 13963100 transitions 10 1\n```\nTraces are expected in the [webcachesim](https://github.com/dasebe/webcachesim) space-separated format with three columns (timestamp, object ID, size) and a separate request on each line:\n\n| time |  id | size |\n| ---- | --- | ---- |\n|   1  |  1  |  120 |\n|   2  |  2  |   64 |\n|   3  |  1  |  120 |\n|   4  |  3  |  14  |\n|   4  |  1  |  120 |\n\nSample trace can be found at `sample_traces/static`.\n\n* `mccache_evaluation_test_dynamic` for dynamic scenario. Usage example is the following:\n```bash\n./mccache_evaluation_test_dynamic ../sample_traces/dynamic/pattern_mixed_fixed_size.tr 6291456 transitions 10 1\n```\nTraces are expected in the extended webcachesim format. The extension consist of first column representing the type of request\n(`s` for set request, `g` for get request):\n\n| type | time |  id | size |\n| ---- | ---- | --- | ---- |\n|   s  |   1  |  1  |  120 |\n|   s  |   2  |  2  |   64 |\n|   g  |   3  |  1  |  120 |\n|   g  |   4  |  2  |  64  |\n|   s  |   4  |  3  |  120 |\n\nSample traces can be found at `sample_traces/dynamic`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev0x13%2Fmccache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev0x13%2Fmccache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev0x13%2Fmccache/lists"}