An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 3.9% on proxy.golang.org
Top 4.2% dependent packages on proxy.golang.org
Top 3.5% dependent repos on proxy.golang.org
Top 6.0% forks on proxy.golang.org
Top 0.8% docker downloads on proxy.golang.org

proxy.golang.org : github.com/gokyle/filecache

You can transparently read and cache a file using RetrieveFile (and RetrieveFileString); if the file is not in the cache, it will be read from the file system and returned - the cache will start a background thread to cache the file. Similarly, the WriterFile method will write the file to the specified io.Writer. For example, you could create a FileServer function along the lines of When cache.Start() is called, a goroutine is launched in the background that routinely checks the cache for expired items. The delay between runs is specified as the number of seconds given by cache.Every ("every cache.Every seconds, check for expired items"). There are three criteria used to determine whether an item in the cache should be expired; they are: The background scanner can be disabled by setting cache.Every to 0; if so, cache expiration is only done when the cache is at capacity. Once the cache is no longer needed, a call to cache.Stop() will close down the channels and signal the background scanner that it should stop.

Registry - Source - Documentation - JSON - codemeta.json
purl: pkg:golang/github.com/gokyle/filecache
License: ISC
Latest release: over 3 years ago
First release: over 3 years ago
Namespace: github.com/gokyle
Dependent packages: 2
Dependent repositories: 2
Stars: 73 on GitHub
Forks: 12 on GitHub
Docker dependents: 1
Docker downloads: 46,269
See more repository details: repos.ecosyste.ms
Last synced: 4 days ago

    Loading...
    Readme
    Loading...