Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultExpiry time.Duration = 24 * 60 * 60 * 1000 * 1000 * 1000
h * m * s * ms * μs * ns 24hrs
Variables ¶
View Source
var DefaultPath = filepath.Join(os.TempDir(), "nom")
View Source
var ErrCacheMiss = errors.New("cache miss")
Functions ¶
This section is empty.
Types ¶
type CacheInterface ¶ added in v1.1.7
type CacheInterface interface { Write(key string, content rss.RSS) error Read(key string) (rss.RSS, error) }
func NewFileCache ¶ added in v1.1.7
func NewFileCache(path string, expiry time.Duration) CacheInterface
func NewMemoryCache ¶ added in v1.1.7
func NewMemoryCache() CacheInterface
type FileCache ¶ added in v1.1.7
type FileCache struct {
// contains filtered or unexported fields
}
type MemoryCache ¶ added in v1.1.7
type MemoryCache struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.