mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-01 02:11:20 +00:00
Crawler performance improvements, better structure
Refactored the crawler implementation to make the whole thing more testable. Added a document interface to make the crawler generic. This will be useful for collecting plugins, and other documents.
This commit is contained in:
@@ -9,6 +9,10 @@ import (
|
||||
redis_cache "github.com/gregjones/httpcache/redis"
|
||||
)
|
||||
|
||||
func FromCache(header http.Header) bool {
|
||||
return header.Get(httpcache.XFromCache) != ""
|
||||
}
|
||||
|
||||
func NewClient(conn redis.Conn) *http.Client {
|
||||
etagCache := redis_cache.NewWithClient(conn)
|
||||
tr := httpcache.NewTransport(etagCache)
|
||||
|
||||
Reference in New Issue
Block a user