{"id":20103826,"url":"https://github.com/ancientlore/cachefs","last_synced_at":"2025-05-06T08:31:22.656Z","repository":{"id":59045204,"uuid":"529973528","full_name":"ancientlore/cachefs","owner":"ancientlore","description":"Package cachefs implements a read-only cache around a fs.FS, using groupcache.","archived":false,"fork":false,"pushed_at":"2024-12-06T22:05:23.000Z","size":18,"stargazers_count":5,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T10:33:50.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ancientlore.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":"2022-08-28T20:35:06.000Z","updated_at":"2024-12-06T22:04:55.000Z","dependencies_parsed_at":"2024-04-27T19:26:08.804Z","dependency_job_id":"a218c89a-5707-4bc3-82fd-9ef300a90a40","html_url":"https://github.com/ancientlore/cachefs","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ancientlore%2Fcachefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ancientlore%2Fcachefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ancientlore%2Fcachefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ancientlore%2Fcachefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ancientlore","download_url":"https://codeload.github.com/ancientlore/cachefs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252648598,"owners_count":21782411,"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-11-13T17:38:35.449Z","updated_at":"2025-05-06T08:31:22.651Z","avatar_url":"https://github.com/ancientlore.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cachefs\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/ancientlore/cachefs.svg)](https://pkg.go.dev/github.com/ancientlore/cachefs)\n\nPackage `cachefs` implements a read-only cache around a `fs.FS`, using `groupcache`.\n\nUsing `cachefs` is straightforward:\n\n\t// Setup groupcache (in this example with no peers)\n\tgroupcache.RegisterPeerPicker(func() groupcache.PeerPicker { return groupcache.NoPeers{} })\n\n\t// Create the cached file system with group name \"groupName\", a 10MB cache, and a ten second expiration\n\tcachedFileSystem := cachefs.New(os.DirFS(\".\"), \u0026cachefs.Config{GroupName: \"groupName\", SizeInBytes: 10*1024*1024, Duration: 10*time.Second})\n\n\t// Use the file system as usual...\n\n`cachefs` \"wraps\" the underlying file system with caching. You can specify groupcache parameters - the group name\nand the cache size.\n\n`groupcache` does not support expiration, but `cachefs` supports quantizing values so that expiration happens\naround the expiration duration provided. Expiration can be disabled by specifying 0 for the duration.\n\nSee https://pkg.go.dev/github.com/golang/groupcache for more information on `groupcache`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fancientlore%2Fcachefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fancientlore%2Fcachefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fancientlore%2Fcachefs/lists"}