GoToSocial/vendor/codeberg.org/gruf/go-cache/v3
kim 6f4ae8f58d
[bugfix] update cache library with nil ptr fix (#2070)
Signed-off-by: kim <grufwub@gmail.com>
2023-08-06 11:55:04 +02:00
..
result [bugfix] update cache library with nil ptr fix (#2070) 2023-08-06 11:55:04 +02:00
simple [performance] add caching of status fave, boost of, in reply to ID lists (#2060) 2023-08-04 12:28:33 +01:00
ttl [feature] simpler cache size configuration (#2051) 2023-08-03 11:34:35 +02:00
LICENSE [feature] simpler cache size configuration (#2051) 2023-08-03 11:34:35 +02:00
README.md [feature] simpler cache size configuration (#2051) 2023-08-03 11:34:35 +02:00
cache.go [feature] simpler cache size configuration (#2051) 2023-08-03 11:34:35 +02:00

README.md

go-cache

Provides access to simple, yet flexible, and performant caches (with TTL if required) via the cache.Cache{} and cache.TTLCache{} interfaces.

simple

A cache.Cache{} implementation with much more of the inner workings exposed. Designed to be used as a base for your own customizations, or used as-is.

ttl

A cache.TTLCache{} implementation with much more of the inner workings exposed. Designed to be used as a base for your own customizations, or used as-is.

result

result.Cache is an example of a more complex cache implementation using ttl.Cache{} as its underpinning.

It provides caching specifically of loadable struct types, with automatic keying by multiple different field members and caching of negative (error) values. All useful when wrapping, for example, a database.