diff options
Diffstat (limited to 'connector/connector.go')
-rw-r--r-- | connector/connector.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/connector/connector.go b/connector/connector.go index 30dfea4..3a2e20c 100644 --- a/connector/connector.go +++ b/connector/connector.go @@ -84,6 +84,13 @@ type Handler interface { // Called when an event occurs in a room // This must not be called for events authored by the user of the connection Event(event *Event) + + // These two functions enable the connector to access a simple key/value + // database to cache some information in order not to generate useless events. + // The connector should function when they are not implemented, + // in which case CacheGet always returns "" + CachePut(key string, value string) + CacheGet(key string) string } type EventType int |