diff options
Diffstat (limited to 'nvdmirror/cache.go')
-rw-r--r-- | nvdmirror/cache.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nvdmirror/cache.go b/nvdmirror/cache.go new file mode 100644 index 0000000..d65b2c7 --- /dev/null +++ b/nvdmirror/cache.go @@ -0,0 +1,22 @@ +package nvdmirror + +import ( + "time" +) + +// Cache entry +type Entry struct { + // time that entry was set + Time time.Time `json:"time"` + Headers map[string]string `json:"headers"` +} + +// URL cache +type Cache interface { + Get(string) (map[string]string, bool) + Set(string, map[string]string) error + + // delete cache entry + Delete(string) error + Close() error // save and close cache file +} |