Skip to content

Commit dcfc985

Browse files
committed
Add overwritten and type_changed KSN types to docs
1 parent 620bee5 commit dcfc985

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

content/develop/reference/modules/modules-api-ref.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5042,6 +5042,8 @@ is interested in. This can be an ORed mask of any of the following flags:
50425042
this notification is wrong and discourage. It will
50435043
cause the read command that trigger the event to be
50445044
replicated to the AOF/Replica.
5045+
- REDISMODULE_NOTIFY_OVERWRITTEN: Overwritten events
5046+
- REDISMODULE_NOTIFY_TYPE_CHANGED: Type-changed events
50455047
- `REDISMODULE_NOTIFY_ALL`: All events (Excluding `REDISMODULE_NOTIFY_KEYMISS`)
50465048
- `REDISMODULE_NOTIFY_LOADED`: A special notification available only for modules,
50475049
indicates that the key was loaded from persistence.

content/develop/use/keyspace-notifications.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ following table:
8383
e Evicted events (events generated when a key is evicted for maxmemory)
8484
m Key miss events (events generated when a key that doesn't exist is accessed)
8585
n New key events (Note: not included in the 'A' class)
86+
o Overwritten events (events generated every time a key is overwritten)
87+
c Type-changed events (events generated every time a key's type changes)
8688
A Alias for "g$lshztxed", so that the "AKE" string means all the events except "m" and "n".
8789

8890
At least `K` or `E` should be present in the string, otherwise no event
@@ -150,6 +152,8 @@ Different commands generate different kind of events according to the following
150152
* Every time a key with a time to live associated is removed from the data set because it expired, an `expired` event is generated.
151153
* Every time a key is evicted from the data set in order to free memory as a result of the `maxmemory` policy, an `evicted` event is generated.
152154
* Every time a new key is added to the data set, a `new` event is generated.
155+
* Every time a key is being overwritten an `overwritten` event is generated.
156+
* Every time a key's type changes a `type_changed` event is generated.
153157

154158
**IMPORTANT** all the commands generate events only if the target key is really modified. For instance an [`SREM`]({{< relref "/commands/srem" >}}) deleting a non-existing element from a Set will not actually change the value of the key, so no event will be generated.
155159

0 commit comments

Comments
 (0)