feat(server): Reimplement local manifest cache backed by files
Implements a local manifest cache that uses the temporary directory to cache manifest builds. This is necessary due to the size of manifests: Keeping them entirely in-memory would quickly balloon the memory usage of Nixery, unless some mechanism for cache eviction is implemented.
This commit is contained in:
parent
313e5d08f1
commit
43a642435b
5 changed files with 71 additions and 52 deletions
|
|
@ -71,13 +71,13 @@ type Config struct {
|
|||
PopUrl string // URL to the Nix package popularity count
|
||||
}
|
||||
|
||||
func FromEnv() (*Config, error) {
|
||||
func FromEnv() (Config, error) {
|
||||
pkgs, err := pkgSourceFromEnv()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return Config{}, err
|
||||
}
|
||||
|
||||
return &Config{
|
||||
return Config{
|
||||
Bucket: getConfig("BUCKET", "GCS bucket for layer storage", ""),
|
||||
Port: getConfig("PORT", "HTTP port", ""),
|
||||
Pkgs: pkgs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue