An open API service indexing awesome lists of open source software.

https://github.com/daanv2/go-cache

some sets / maps usable for large amount of storage of items concurrently.
https://github.com/daanv2/go-cache

cache caches go golang large

Last synced: 3 months ago
JSON representation

some sets / maps usable for large amount of storage of items concurrently.

Awesome Lists containing this project

README

        

# Cache

[![Pipeline](https://github.com/DaanV2/go-cache/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/DaanV2/go-cache/actions/workflows/pipeline.yaml)

[WIP] some sets / maps usable for large amount of storage of items concurrently.

```bash
go get github.com/daanv2/go-cache
```

```go
col, err := sets.NewBuckettedSet[*test_util.TestItem](size*10, test_util.Hasher())
require.NoError(t, err)

items := test_util.Generate(int(size))
test_util.Shuffle(items)

for _, item := range items {
v, ok := col.GetOrAdd(item)
require.True(t, ok)
require.Equal(t, v, item)
}
```