Skip to content

Commit

Permalink
Improve package docs
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed Apr 9, 2022
1 parent 48183e3 commit 9a85eeb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package sc

// CacheOption represents a single cache option.
// See other package-level functions which return CacheOption for more details.
type CacheOption func(c *cacheConfig)

type cacheConfig struct {
Expand Down Expand Up @@ -64,7 +66,8 @@ func With2QBackend(capacity int) CacheOption {
// the current one finishes or Cache.Forget is called.
//
// This is a generalization of so-called 'zero-time-cache', where the original zero-time-cache behavior is
// achievable with zero freshFor/ttl values. cf: https://qiita.com/methane/items/27ccaee5b989fb5fca72
// achievable with zero freshFor/ttl values.
// see also: https://qiita.com/methane/items/27ccaee5b989fb5fca72 (ja)
//
// This is only useful if the freshFor/ttl value is very short (as in the range of a few hundred milliseconds) or
// the request takes a very long time to finish, and you need fresh values for each response.
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Package sc provides a simple, idiomatic in-memory caching system.
// Package sc provides a simple, idiomatic in-memory caching layer.
package sc

0 comments on commit 9a85eeb

Please sign in to comment.