summaryrefslogtreecommitdiffstats
path: root/vault-0.5.3-twoqueue.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vault-0.5.3-twoqueue.patch')
-rw-r--r--vault-0.5.3-twoqueue.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/vault-0.5.3-twoqueue.patch b/vault-0.5.3-twoqueue.patch
new file mode 100644
index 0000000..7757c68
--- /dev/null
+++ b/vault-0.5.3-twoqueue.patch
@@ -0,0 +1,42 @@
+diff -urN vault-9617c6eb79c3453aa569d620fc71e90f7e32f72f.orig/physical/cache.go vault-9617c6eb79c3453aa569d620fc71e90f7e32f72f/physical/cache.go
+--- vault-9617c6eb79c3453aa569d620fc71e90f7e32f72f.orig/physical/cache.go 2016-05-27 10:34:47.000000000 -0700
++++ vault-9617c6eb79c3453aa569d620fc71e90f7e32f72f/physical/cache.go 2017-03-06 22:44:42.268610780 -0800
+@@ -17,7 +17,7 @@
+ // by using a simple write-through cache.
+ type Cache struct {
+ backend Backend
+- lru *lru.TwoQueueCache
++ lru *lru.Cache
+ }
+
+ // NewCache returns a physical cache of the given size.
+@@ -26,7 +26,7 @@
+ if size <= 0 {
+ size = DefaultCacheSize
+ }
+- cache, _ := lru.New2Q(size)
++ cache, _ := lru.New(size)
+ c := &Cache{
+ backend: b,
+ lru: cache,
+diff -urN vault-9617c6eb79c3453aa569d620fc71e90f7e32f72f.orig/vault/policy_store.go vault-9617c6eb79c3453aa569d620fc71e90f7e32f72f/vault/policy_store.go
+--- vault-9617c6eb79c3453aa569d620fc71e90f7e32f72f.orig/vault/policy_store.go 2016-05-27 10:34:47.000000000 -0700
++++ vault-9617c6eb79c3453aa569d620fc71e90f7e32f72f/vault/policy_store.go 2017-03-06 22:45:57.929208795 -0800
+@@ -23,7 +23,7 @@
+ // manage ACLs associated with them.
+ type PolicyStore struct {
+ view *BarrierView
+- lru *lru.TwoQueueCache
++ lru *lru.Cache
+ }
+
+ // PolicyEntry is used to store a policy by name
+@@ -35,7 +35,7 @@
+ // NewPolicyStore creates a new PolicyStore that is backed
+ // using a given view. It used used to durable store and manage named policy.
+ func NewPolicyStore(view *BarrierView) *PolicyStore {
+- cache, _ := lru.New2Q(policyCacheSize)
++ cache, _ := lru.New(policyCacheSize)
+ p := &PolicyStore{
+ view: view,
+ lru: cache,