fixed realtime delete event to be called after the record was deleted from the db
This commit is contained in:
@@ -35,6 +35,9 @@ type Client interface {
|
||||
// Set stores any value to the client's context.
|
||||
Set(key string, value any)
|
||||
|
||||
// Unset removes a single value from the client's context.
|
||||
Unset(key string)
|
||||
|
||||
// Get retrieves the key value from the client's context.
|
||||
Get(key string) any
|
||||
|
||||
@@ -157,6 +160,14 @@ func (c *DefaultClient) Set(key string, value any) {
|
||||
c.store[key] = value
|
||||
}
|
||||
|
||||
// Unset implements the [Client.Unset] interface method.
|
||||
func (c *DefaultClient) Unset(key string) {
|
||||
c.mux.Lock()
|
||||
defer c.mux.Unlock()
|
||||
|
||||
delete(c.store, key)
|
||||
}
|
||||
|
||||
// Discard implements the [Client.Discard] interface method.
|
||||
func (c *DefaultClient) Discard() {
|
||||
c.mux.Lock()
|
||||
|
||||
Reference in New Issue
Block a user