{"id":17081500,"url":"https://github.com/benfoster/cachecowdemo","last_synced_at":"2025-03-23T13:22:23.731Z","repository":{"id":11696044,"uuid":"14209213","full_name":"benfoster/CacheCowDemo","owner":"benfoster","description":"A demo of using CacheCow in a hierarchical REST API. ","archived":false,"fork":false,"pushed_at":"2013-11-07T16:39:43.000Z","size":568,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T23:49:32.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/benfoster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-07T16:35:01.000Z","updated_at":"2016-06-10T14:30:37.000Z","dependencies_parsed_at":"2022-09-15T21:50:37.209Z","dependency_job_id":null,"html_url":"https://github.com/benfoster/CacheCowDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoster%2FCacheCowDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoster%2FCacheCowDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoster%2FCacheCowDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoster%2FCacheCowDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benfoster","download_url":"https://codeload.github.com/benfoster/CacheCowDemo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245105665,"owners_count":20561566,"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":[],"created_at":"2024-10-14T12:53:19.442Z","updated_at":"2025-03-23T13:22:23.698Z","avatar_url":"https://github.com/benfoster.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CacheCow Demo\n\nDemonstrates using the [CacheCow ASP.NET Web API Caching Library](https://github.com/aliostad/CacheCow/) within a heirarchical REST API.\n\nSpecifically it ensures that caching works for related resources such that:\n\n`POST /contacts` invalidates `/contacts`  \n`PUT /contacts/10` invalidates `/contacts/10, /contacts`  \n`POST /contacts/10/numbers` invalidates `/contacts/10/numbers, /contacts/10, /contacts`\n\nAlthough I'm not using it in the example the `LinkedRouteProvider` can be tweaked to set a maximum cache invalidation depth. \n\nFor example if you have quite a deep heirarchy you may want a POST to `/sites/10/contacts/10/numbers` to only invalidate up to `/sites/10/contacts` (not `/sites/10` or above). \nThis can be achieved by setting a max invalidation depth:\n\nChange:\n\n\treturn GetRelatedResources(path);\n\nTo:\n\n\t// don't invalidate anything above the 3rd resource in the heirarchy\n\treturn GetRelatedResources(path, 3);\n\n## License\n\nLicensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenfoster%2Fcachecowdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenfoster%2Fcachecowdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenfoster%2Fcachecowdemo/lists"}