Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #227 from twelho/cache-invalidation
Browse files Browse the repository at this point in the history
Support checksum-based Cache invalidation, improve cache's object handling
  • Loading branch information
twelho authored Jul 22, 2019
2 parents 4ade869 + 9c57e26 commit 5481f71
Show file tree
Hide file tree
Showing 18 changed files with 1,929 additions and 1,748 deletions.
2,840 changes: 1,420 additions & 1,420 deletions docs/dependencies.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion pkg/apis/ignite/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

api "github.com/weaveworks/ignite/pkg/apis/ignite"
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"

"k8s.io/apimachinery/pkg/util/validation/field"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/client/client_dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/storage"
"github.com/weaveworks/ignite/pkg/storage/filterer"

"k8s.io/apimachinery/pkg/runtime/schema"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/client/client_resource_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/storage"
"github.com/weaveworks/ignite/pkg/storage/filterer"

"k8s.io/apimachinery/pkg/runtime/schema"
)

Expand Down
2 changes: 0 additions & 2 deletions pkg/client/zz_generated.client_image.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
Note: This file is autogenerated! Do not edit it manually!
Edit client_image_template.go instead, and run
Expand All @@ -15,7 +14,6 @@ import (
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/storage"
"github.com/weaveworks/ignite/pkg/storage/filterer"

"k8s.io/apimachinery/pkg/runtime/schema"
)

Expand Down
2 changes: 0 additions & 2 deletions pkg/client/zz_generated.client_kernel.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
Note: This file is autogenerated! Do not edit it manually!
Edit client_kernel_template.go instead, and run
Expand All @@ -15,7 +14,6 @@ import (
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/storage"
"github.com/weaveworks/ignite/pkg/storage/filterer"

"k8s.io/apimachinery/pkg/runtime/schema"
)

Expand Down
2 changes: 0 additions & 2 deletions pkg/client/zz_generated.client_vm.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
Note: This file is autogenerated! Do not edit it manually!
Edit client_vm_template.go instead, and run
Expand All @@ -15,7 +14,6 @@ import (
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/storage"
"github.com/weaveworks/ignite/pkg/storage/filterer"

"k8s.io/apimachinery/pkg/runtime/schema"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/gitops/gitops.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/weaveworks/ignite/pkg/dmlegacy"
"github.com/weaveworks/ignite/pkg/gitops/gitdir"
"github.com/weaveworks/ignite/pkg/operations"
"github.com/weaveworks/ignite/pkg/storage"
"github.com/weaveworks/ignite/pkg/storage/cache"
"github.com/weaveworks/ignite/pkg/storage/manifest"
"github.com/weaveworks/ignite/pkg/util"
)
Expand All @@ -35,7 +35,7 @@ func RunLoop(url, branch string) error {
// Construct a manifest storage for the path backed by git
s := manifest.NewManifestStorage(dataDir)
// Wrap the Manifest Storage with a cache for better performance, and create a client
c = client.NewClient(storage.NewCache(s))
c = client.NewClient(cache.NewCache(s))
// Construct the GitDirectory implementation which backs the storage
gitDir = gitdir.NewGitDirectory(url, dataDir, branch, syncInterval)
// Start the GitDirectory sync loop
Expand Down
3 changes: 2 additions & 1 deletion pkg/providers/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import (
"github.com/weaveworks/ignite/pkg/apis/ignite/scheme"
"github.com/weaveworks/ignite/pkg/constants"
"github.com/weaveworks/ignite/pkg/storage"
"github.com/weaveworks/ignite/pkg/storage/cache"
)

// Storage is the default storage implementation
var Storage storage.Storage

func SetCachedStorage() error {
Storage = storage.NewCache(
Storage = cache.NewCache(
storage.NewGenericStorage(
storage.NewDefaultRawStorage(constants.DATA_DIR), scheme.Serializer))
return nil
Expand Down
292 changes: 0 additions & 292 deletions pkg/storage/cache.go

This file was deleted.

Loading

0 comments on commit 5481f71

Please sign in to comment.