package storage

import "github.com/keybase/client/go/chat/globals"

func SetupGlobalHooks(g *globals.Context) {
	g.ExternalG().AddLogoutHook(inboxMemCache, "chat/storage/inbox")
	g.ExternalG().AddDbNukeHook(inboxMemCache, "chat/storage/inbox")

	g.ExternalG().AddLogoutHook(outboxMemCache, "chat/storage/outbox")
	g.ExternalG().AddDbNukeHook(outboxMemCache, "chat/storage/outbox")

	g.ExternalG().AddLogoutHook(readOutboxMemCache, "chat/storage/readoutbox")
	g.ExternalG().AddDbNukeHook(readOutboxMemCache, "chat/storage/readoutbox")

	g.ExternalG().AddLogoutHook(reacjiMemCache, "chat/storage/reacjiMemCache")
	g.ExternalG().AddDbNukeHook(reacjiMemCache, "chat/storage/reacjiMemCache")

	g.ExternalG().AddLogoutHook(blockEngineMemCache, "chat/storage/blockEngineMemCache")
	g.ExternalG().AddDbNukeHook(blockEngineMemCache, "chat/storage/blockEngineMemCache")
}
