{"id":25042689,"url":"https://github.com/juntaki/transparent","last_synced_at":"2026-03-16T08:04:30.650Z","repository":{"id":57522542,"uuid":"73926840","full_name":"juntaki/transparent","owner":"juntaki","description":"Transparent cache and distributed commit to key-value store","archived":false,"fork":false,"pushed_at":"2017-01-02T15:16:45.000Z","size":106,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T15:21:26.400Z","etag":null,"topics":["cache","distributed-transactions","golang","s3","stack"],"latest_commit_sha":null,"homepage":"","language":"Go","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/juntaki.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-11-16T14:14:02.000Z","updated_at":"2023-11-18T20:36:37.000Z","dependencies_parsed_at":"2022-09-26T18:00:54.642Z","dependency_job_id":null,"html_url":"https://github.com/juntaki/transparent","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/juntaki%2Ftransparent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntaki%2Ftransparent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntaki%2Ftransparent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntaki%2Ftransparent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juntaki","download_url":"https://codeload.github.com/juntaki/transparent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248805444,"owners_count":21164332,"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-transactions","golang","s3","stack"],"created_at":"2025-02-06T04:46:53.793Z","updated_at":"2026-03-16T08:04:30.613Z","avatar_url":"https://github.com/juntaki.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# transparent\n\nTransparent cache and distributed commit to key-value store written in Go.\n\n[![Build Status](https://travis-ci.org/juntaki/transparent.svg?branch=master)](https://travis-ci.org/juntaki/transparent)\n[![Coverage Status](https://coveralls.io/repos/github/juntaki/transparent/badge.svg?branch=master)](https://coveralls.io/github/juntaki/transparent?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/juntaki/transparent)](https://goreportcard.com/report/github.com/juntaki/transparent)\n[![GoDoc](https://godoc.org/github.com/juntaki/transparent?status.svg)](https://godoc.org/github.com/juntaki/transparent)\n\n\n## Documentation\n\n### Installation\n\n~~~ sh\ngo get github.com/juntaki/transparent\n~~~\n\n### Basic usage\n\nFirst, create layers and stack them with Stack.Stack().\nThis example adds LRU memory cache and filesystem cache to dummy source layer.\n\n~~~go\n\tcacheLayer1, _ := lru.NewCache(10, 100)\n\tcacheLayer2 := filesystem.NewCache(10, \"/tmp\")\n\tsourceLayer := test.NewSource(10)\n\n\tstack := transparent.NewStack()\n\tstack.Stack(sourceLayer)\n\tstack.Stack(cacheLayer2)\n\tstack.Stack(cacheLayer1)\n~~~\n\nIf you manipulate the Stack, the value will be transmitted from top layer to the bottom layer transparently.\n\n~~~go\n\tstack.Set(\"key\", []byte(\"value\"))\n\tstack.Sync()\n    \n    // value, _ = cacheLayer1.Get(\"key\") // \"value\"\n\t// value, _ = cacheLayer2.Get(\"key\") // \"value\"\n\t// value, _ = sourceLayer.Get(\"key\") // \"value\"\n\n\tvalue, _ := stack.Get(\"key\")\n\tfmt.Printf(\"%s\\n\", value)            // \"value\"\n~~~\n\nFor details, please refer to [Godoc] (https://godoc.org/github.com/juntaki/transparent).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntaki%2Ftransparent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuntaki%2Ftransparent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntaki%2Ftransparent/lists"}