Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Unified Diff: logdog/common/storage/memory/memory.go

Issue 2435113002: LogDog: Add Storage-layer data caching. (Closed)
Patch Set: Fix byteLimit bug. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « logdog/common/storage/memory/cache.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/common/storage/memory/memory.go
diff --git a/logdog/common/storage/memory/memory.go b/logdog/common/storage/memory/memory.go
index f5826f46cd3e63bc8e71bea97ebc3f2f38c60216..8186971f32a24b00e8fc896a2c947c224706f32e 100644
--- a/logdog/common/storage/memory/memory.go
+++ b/logdog/common/storage/memory/memory.go
@@ -57,6 +57,15 @@ func (s *Storage) Close() {
})
}
+// ResetClose resets the storage instance, allowing it to be used another time.
+// The data stored in this instance is not changed.
+func (s *Storage) ResetClose() {
+ s.stateMu.Lock()
+ defer s.stateMu.Unlock()
+
+ s.closed = false
+}
+
// Config implements storage.Storage.
func (s *Storage) Config(cfg storage.Config) error {
return s.run(func() error {
« no previous file with comments | « logdog/common/storage/memory/cache.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698